Use resource in chat sessions

This commit is contained in:
James Booth
2015-01-04 20:19:42 +00:00
parent 4898ed10a4
commit 42a5c431c7
11 changed files with 209 additions and 87 deletions

View File

@@ -199,15 +199,14 @@ stanza_create_bookmarks_pubsub_add(xmpp_ctx_t *ctx, const char * const jid,
#endif
xmpp_stanza_t *
stanza_create_chat_state(xmpp_ctx_t *ctx, const char * const recipient,
const char * const state)
stanza_create_chat_state(xmpp_ctx_t *ctx, const char * const fulljid, const char * const state)
{
xmpp_stanza_t *msg, *chat_state;
msg = xmpp_stanza_new(ctx);
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);
xmpp_stanza_set_attribute(msg, STANZA_ATTR_TO, fulljid);
char *id = create_unique_id(NULL);
xmpp_stanza_set_id(msg, id);
free(id);