From 917faecdcbf07b63173b34b708cff5bdf6476d25 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Thu, 19 Jul 2012 23:54:18 -0700 Subject: Fix issue of roster data being split across multiple rosters. Resolved by always normalizing JIDs to bare form, regardless of if they are JID objects or strings. Also simplified related code to prefer use of JID objects instead of strings so they don't need to be parsed multiple times. --- sleekxmpp/componentxmpp.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'sleekxmpp/componentxmpp.py') diff --git a/sleekxmpp/componentxmpp.py b/sleekxmpp/componentxmpp.py index 20748b69..265ecd42 100644 --- a/sleekxmpp/componentxmpp.py +++ b/sleekxmpp/componentxmpp.py @@ -158,10 +158,8 @@ class ComponentXMPP(BaseXMPP): """ self.session_bind_event.set() self.session_started_event.set() - self.event("session_bind", self.xmpp.boundjid.full, direct=True) + self.event("session_bind", self.xmpp.boundjid, direct=True) self.event("session_start") - def _handle_probe(self, presence): - pto = presence['to'].bare - pfrom = presence['from'].bare - self.roster[pto][pfrom].handle_probe(presence) + def _handle_probe(self, pres): + self.roster[pres['to']][pres['from']].handle_probe(pres) -- cgit v1.2.3