From afb5e7c9a252270490ef2e0f153116e791d6ed0d Mon Sep 17 00:00:00 2001 From: souliane Date: Tue, 25 Feb 2014 18:47:15 +0100 Subject: [PATCH] core (xmpp): fix automatic contact deletion --- src/core/xmpp.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/core/xmpp.py b/src/core/xmpp.py index c318def8..bb23fd39 100644 --- a/src/core/xmpp.py +++ b/src/core/xmpp.py @@ -173,9 +173,11 @@ class SatRosterProtocol(xmppim.RosterClientProtocol): d = self.getRoster().addCallback(self.rosterCb) d.chainDeferred(self.got_roster) - def removeItem(self, to): - """Remove a contact from roster list""" - xmppim.RosterClientProtocol.removeItem(self, to) + def removeItem(self, to_jid): + """Remove a contact from roster list + @param to_jid: a JID instance + """ + xmppim.RosterClientProtocol.removeItem(self, to_jid) #TODO: check IQ result #XXX: disabled (cf http://wokkel.ik.nu/ticket/56)) @@ -383,7 +385,7 @@ class SatPresenceProtocol(xmppim.PresenceClientProtocol): item = self.parent.roster.getItem(entity) if item and item.subscriptionFrom: # we automatically remove contact debug(_('automatic contact deletion')) - self.host.delContact(entity.userhost(), self.parent.profile) + self.host.delContact(entity, self.parent.profile) self.host.bridge.subscribe('unsubscribe', entity.userhost(), self.parent.profile)