summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream
diff options
context:
space:
mode:
Diffstat (limited to 'sleekxmpp/xmlstream')
-rw-r--r--sleekxmpp/xmlstream/jid.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/sleekxmpp/xmlstream/jid.py b/sleekxmpp/xmlstream/jid.py
index 789410b9..aa17c7bc 100644
--- a/sleekxmpp/xmlstream/jid.py
+++ b/sleekxmpp/xmlstream/jid.py
@@ -94,6 +94,14 @@ class JID(object):
elif name in ('server', 'domain', 'host'):
self.domain = value
elif name in ('full', 'jid'):
+ if '@' not in value:
+ if '/' in value:
+ d, r = value.split('/', 1)
+ object.__setattr__(self, "_resource", r)
+ else:
+ d = value
+ object.__setattr__(self, "_domain", d)
+ else:
self.reset(value)
elif name == 'bare':
if '@' in value: