From 46b3ff6f440546a6cc253610b05f3ae957f094e7 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 26 Jan 2014 14:15:04 +0000 Subject: [PATCH] Added generated id to chat state stanzas --- src/xmpp/stanza.c | 2 ++ 1 file changed, 2 insertions(+) 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);