}
for (int loop = 0;loop < g_engine_count;loop++) {
- /* Need to find the appropriate engine for this assistant,
- for now assuming 0 is the one */
- if(loop == 0) {
+ auto iter = std::find(
+ g_wakeup_engine_info[loop].assistant_list.begin(),
+ g_wakeup_engine_info[loop].assistant_list.end(),
+ std::string{appid});
+ if (iter != g_wakeup_engine_info[loop].assistant_list.end()) {
if (g_wakeup_engine_info[loop].interface.set_assistant_specific_command) {
- g_wakeup_engine_info[loop].interface.set_assistant_specific_command(appid, command);
+ g_wakeup_engine_info[loop].interface.set_assistant_specific_command(
+ appid, command);
}
}
}