Fixed leaving chat room

This commit is contained in:
James Booth
2012-11-09 01:31:52 +00:00
parent 187ea6e8b8
commit 8099dfbde6
3 changed files with 18 additions and 2 deletions

View File

@@ -98,4 +98,19 @@ stanza_create_room_presence(xmpp_ctx_t *ctx, const char * const room,
return presence;
}
/*
xmpp_stanza_t *
stanza_create_room_leave(xmpp_ctx_t *ctx, const char * const room,
const char * const nick)
{
GString *full_jid = g_string_new(room);
g_string_append(full_jid, "/");
g_string_append(full_jid, nick);
xmpp_stanza_t *presence = xmpp_stanza_new(ctx);
xmpp_stanza_set_name(presence, STANZA_NAME_PRESENCE);
xmpp_stanza_set_type(presence, STANZA_TYPE_UNAVAILABLE);
g_string_free(full_jid, TRUE);
}
*/