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/xmlstream/jid.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sleekxmpp/xmlstream/jid.py') 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) -- cgit v1.2.3