Add and remove from roster on subscription presence

This commit is contained in:
James Booth
2012-11-28 01:04:40 +00:00
parent a061b0d452
commit 80c2209bbd
3 changed files with 15 additions and 1 deletions

View File

@@ -793,6 +793,11 @@ _iq_handler(xmpp_conn_t * const conn,
const char *jid = xmpp_stanza_get_attribute(item, STANZA_ATTR_JID);
const char *sub = xmpp_stanza_get_attribute(item, STANZA_ATTR_SUBSCRIPTION);
if (g_strcmp0(sub, "remove") == 0) {
contact_list_remove(jid);
return TRUE;
}
gboolean pending_out = FALSE;
const char *ask = xmpp_stanza_get_attribute(item, STANZA_ATTR_ASK);
if ((ask != NULL) && (strcmp(ask, "subscribe") == 0)) {