summaryrefslogtreecommitdiff
path: root/sleekxmpp/componentxmpp.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-07-19 23:54:18 -0700
committerLance Stout <lancestout@gmail.com>2012-07-19 23:54:18 -0700
commit917faecdcbf07b63173b34b708cff5bdf6476d25 (patch)
tree3a456b4ffa3de085fbad0312eaf27d4147af29eb /sleekxmpp/componentxmpp.py
parentf6edaa56a6e91f7104cd63e5d48b39d4ca7e09f2 (diff)
downloadslixmpp-917faecdcbf07b63173b34b708cff5bdf6476d25.tar.gz
slixmpp-917faecdcbf07b63173b34b708cff5bdf6476d25.tar.bz2
slixmpp-917faecdcbf07b63173b34b708cff5bdf6476d25.tar.xz
slixmpp-917faecdcbf07b63173b34b708cff5bdf6476d25.zip
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.
Diffstat (limited to 'sleekxmpp/componentxmpp.py')
-rw-r--r--sleekxmpp/componentxmpp.py8
1 files changed, 3 insertions, 5 deletions
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)