summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream/jid.py
diff options
context:
space:
mode:
authorNathan Fritz <nathan@andyet.net>2010-10-14 16:34:16 -0700
committerNathan Fritz <nathan@andyet.net>2010-10-14 16:34:16 -0700
commit8b5c1010deff77247957c75358d5b8101ceaa96b (patch)
treeb2bda47549bbe07a6c1b0168396dacbf5634e429 /sleekxmpp/xmlstream/jid.py
parent95ad8a1878c5792101e6bd9d1f64a2bbbe223398 (diff)
downloadslixmpp-8b5c1010deff77247957c75358d5b8101ceaa96b.tar.gz
slixmpp-8b5c1010deff77247957c75358d5b8101ceaa96b.tar.bz2
slixmpp-8b5c1010deff77247957c75358d5b8101ceaa96b.tar.xz
slixmpp-8b5c1010deff77247957c75358d5b8101ceaa96b.zip
fixed JID to accept server/domain/host as the same
Diffstat (limited to 'sleekxmpp/xmlstream/jid.py')
-rw-r--r--sleekxmpp/xmlstream/jid.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sleekxmpp/xmlstream/jid.py b/sleekxmpp/xmlstream/jid.py
index 3e997113..789410b9 100644
--- a/sleekxmpp/xmlstream/jid.py
+++ b/sleekxmpp/xmlstream/jid.py
@@ -67,7 +67,7 @@ class JID(object):
else:
self._user = self._user
return self._user or ""
- elif name in ('server', 'domain'):
+ elif name in ('server', 'domain', 'host'):
if self._domain is None:
self._domain = self._jid.split('@', 1)[-1].split('/', 1)[0]
return self._domain or ""
@@ -91,7 +91,7 @@ class JID(object):
if name in ('resource', 'user', 'domain'):
object.__setattr__(self, "_%s" % name, value)
self.regenerate()
- elif name == 'server':
+ elif name in ('server', 'domain', 'host'):
self.domain = value
elif name in ('full', 'jid'):
self.reset(value)