From 8b5c1010deff77247957c75358d5b8101ceaa96b Mon Sep 17 00:00:00 2001 From: Nathan Fritz Date: Thu, 14 Oct 2010 16:34:16 -0700 Subject: [PATCH] fixed JID to accept server/domain/host as the same --- sleekxmpp/xmlstream/jid.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sleekxmpp/xmlstream/jid.py b/sleekxmpp/xmlstream/jid.py index 3e99711..789410b 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)