about summary refs log tree commit diff stats
path: root/src/xmpp/stanza.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-01-26 14:15:04 +0000
committerJames Booth <boothj5@gmail.com>2014-01-26 14:15:04 +0000
commit46b3ff6f440546a6cc253610b05f3ae957f094e7 (patch)
treed7b2a6fdccbf2f5a470d31e4fa74c0380212f791 /src/xmpp/stanza.c
parent7184c34d30e38a70479b78056f1a5faa41a1a1f8 (diff)
downloadprofani-tty-46b3ff6f440546a6cc253610b05f3ae957f094e7.tar.gz
Added generated id to chat state stanzas
Diffstat (limited to 'src/xmpp/stanza.c')
-rw-r--r--src/xmpp/stanza.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/xmpp/stanza.c b/src/xmpp/stanza.c
index 969d6131..7f754dd3 100644
--- a/src/xmpp/stanza.c
+++ b/src/xmpp/stanza.c
@@ -102,6 +102,8 @@ stanza_create_chat_state(xmpp_ctx_t *ctx, const char * const recipient,
     xmpp_stanza_set_name(msg, STANZA_NAME_MESSAGE);
     xmpp_stanza_set_type(msg, STANZA_TYPE_CHAT);
     xmpp_stanza_set_attribute(msg, STANZA_ATTR_TO, recipient);
+    char *id = generate_unique_id(NULL);
+    xmpp_stanza_set_id(msg, id);
 
     chat_state = xmpp_stanza_new(ctx);
     xmpp_stanza_set_name(chat_state, state);