Mercurial > pidgin
changeset 26952:1dcee141997d
The server list is definitive for who is blocked.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Wed, 27 May 2009 00:57:17 +0000 |
parents | 10c91922bc1e |
children | d99cc163a53f |
files | libpurple/protocols/jabber/jabber.c |
diffstat | 1 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jabber.c Tue May 26 23:44:55 2009 +0000 +++ b/libpurple/protocols/jabber/jabber.c Wed May 27 00:57:17 2009 +0000 @@ -1716,21 +1716,23 @@ "blocklist", "urn:xmpp:blocking"); account = purple_connection_get_account(js->gc); - if (blocklist == NULL) + if (type == JABBER_IQ_ERROR || blocklist == NULL) return; /* This is the only privacy method supported by XEP-0191 */ - if (account->perm_deny != PUPRLE_PRIVACY_DENY_USERS) + if (account->perm_deny != PURPLE_PRIVACY_DENY_USERS) account->perm_deny = PURPLE_PRIVACY_DENY_USERS; /* - * FIXME: We should probably completely override the local list with - * the contents of the server list instead of merging them. + * TODO: When account->deny is something more than a hash table, this can + * be re-written to find the set intersection and difference. */ + while (account->deny) + purple_privacy_deny_remove(account, account->deny->data, TRUE); + item = xmlnode_get_child(blocklist, "item"); while (item != NULL) { const char *jid = xmlnode_get_attrib(item, "jid"); - purple_privacy_deny_add(account, jid, TRUE); item = xmlnode_get_next_twin(item); }