1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-09-22 19:45:54 -04:00

Send active stanza in messages

To continue receiving typing notifications
This commit is contained in:
James Booth 2012-08-16 01:08:20 +01:00
parent d3f5daf11d
commit 41daf09432

View File

@ -155,7 +155,11 @@ jabber_send(const char * const msg, const char * const recipient)
char *coded_msg2 = str_replace(coded_msg, "<", "&lt;");
char *coded_msg3 = str_replace(coded_msg2, ">", "&gt;");
xmpp_stanza_t *reply, *body, *text;
xmpp_stanza_t *reply, *body, *text, *active;
active = xmpp_stanza_new(jabber_conn.ctx);
xmpp_stanza_set_name(active, "active");
xmpp_stanza_set_ns(active, "http://jabber.org/protocol/chatstates");
reply = xmpp_stanza_new(jabber_conn.ctx);
xmpp_stanza_set_name(reply, "message");
@ -167,6 +171,7 @@ jabber_send(const char * const msg, const char * const recipient)
text = xmpp_stanza_new(jabber_conn.ctx);
xmpp_stanza_set_text(text, coded_msg3);
xmpp_stanza_add_child(reply, active);
xmpp_stanza_add_child(body, text);
xmpp_stanza_add_child(reply, body);