summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream/jid.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/xmlstream/jid.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/xmlstream/jid.py')
-rw-r--r--sleekxmpp/xmlstream/jid.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/sleekxmpp/xmlstream/jid.py b/sleekxmpp/xmlstream/jid.py
index 281bf4ee..1582164a 100644
--- a/sleekxmpp/xmlstream/jid.py
+++ b/sleekxmpp/xmlstream/jid.py
@@ -143,3 +143,6 @@ class JID(object):
def __hash__(self):
"""Hash a JID based on the string version of its full JID."""
return hash(self.full)
+
+ def __copy__(self):
+ return JID(self.jid)