pidgin: 7e9a2d69: jabber: Fix removing a buddy with a pend...

darkrain42 at pidgin.im darkrain42 at pidgin.im
Mon Oct 5 14:17:04 EDT 2009


-----------------------------------------------------------------
Revision: 7e9a2d695d306037e07cd5644ea5c5cbc14dca3d
Ancestor: b4458fccbc3c9ab0c1c9105eb68c47ffa7c62e5a
Author: darkrain42 at pidgin.im
Date: 2009-10-05T18:10:08
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/7e9a2d695d306037e07cd5644ea5c5cbc14dca3d

Modified files:
        libpurple/protocols/jabber/roster.c

ChangeLog: 

jabber: Fix removing a buddy with a pending subscription.

deryni noticed that an attempt to remove the buddy would put them in
the Buddies group (a second removal succeeded).

ejabberd responds to the initial removal with a roster push that looks like:
<item ask='subscribe' subscription='remove' jid='user at example.com'/>

The subscribe was munging up this check. The user is no longer listed in
the roster, though.

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/roster.c	e5cb0fd6d8bf4076e096ea1d80a13ed4ec4b6b5c
+++ libpurple/protocols/jabber/roster.c	648e029bc757f394c00a8cf3a31315f8b302c3f2
@@ -229,7 +229,7 @@ void jabber_roster_parse(JabberStream *j
 		else
 			jb->subscription &= ~JABBER_SUB_PENDING;
 
-		if(jb->subscription == JABBER_SUB_REMOVE) {
+		if(jb->subscription & JABBER_SUB_REMOVE) {
 			remove_purple_buddies(js, jid);
 		} else {
 			GSList *groups = NULL;


More information about the Commits mailing list