diff options
author | James Booth <boothj5@gmail.com> | 2012-08-16 01:08:20 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2012-08-16 01:08:20 +0100 |
commit | 41daf094323a1a35565b8fdcfd1e9897529b39ad (patch) | |
tree | 85ed32534b89e2322d9e983341a8a9822dc8383f /src | |
parent | d3f5daf11d398ddbaec778bb76cd527908bd2d96 (diff) | |
download | profani-tty-41daf094323a1a35565b8fdcfd1e9897529b39ad.tar.gz |
Send active stanza in messages
To continue receiving typing notifications
Diffstat (limited to 'src')
-rw-r--r-- | src/jabber.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/jabber.c b/src/jabber.c index 1090302c..1aec1c05 100644 --- a/src/jabber.c +++ b/src/jabber.c @@ -155,7 +155,11 @@ jabber_send(const char * const msg, const char * const recipient) char *coded_msg2 = str_replace(coded_msg, "<", "<"); char *coded_msg3 = str_replace(coded_msg2, ">", ">"); - 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); |