/** * Forward result */ static iks *prompt_component_handle_result(struct rayo_actor *prompt, struct rayo_message *msg, void *data) { iks *iq = msg->payload; /* forward all results, except for internal ones... */ if (strncmp("mod_rayo-prompt", iks_find_attrib_soft(iq, "id"), 15)) { iks_insert_attrib(iq, "from", RAYO_JID(prompt)); iks_insert_attrib(iq, "to", RAYO_COMPONENT(prompt)->client_jid); RAYO_SEND_REPLY_DUP(prompt, RAYO_COMPONENT(prompt)->client_jid, iq); } return NULL; }
/** * Forward result */ static iks *prompt_component_handle_result(struct rayo_actor *prompt, struct rayo_message *msg, void *data) { iks *iq = msg->payload; /* forward all results, except for internal ones... */ const char *id = iks_find_attrib_soft(iq, "id"); if (strncmp("mod_rayo-prompt", id, 15)) { iks_insert_attrib(iq, "from", RAYO_JID(prompt)); iks_insert_attrib(iq, "to", RAYO_COMPONENT(prompt)->client_jid); RAYO_SEND_REPLY_DUP(prompt, RAYO_COMPONENT(prompt)->client_jid, iq); } else if (!strcmp(PROMPT_COMPONENT(prompt)->start_timers_request_id, id)) { rayo_component_send_input_timers_started_event(RAYO_COMPONENT(prompt)); } return NULL; }