mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-24 03:00:15 +00:00
fixed JID to accept server/domain/host as the same
This commit is contained in:
parent
95ad8a1878
commit
8b5c1010de
1 changed files with 2 additions and 2 deletions
|
@ -67,7 +67,7 @@ class JID(object):
|
||||||
else:
|
else:
|
||||||
self._user = self._user
|
self._user = self._user
|
||||||
return self._user or ""
|
return self._user or ""
|
||||||
elif name in ('server', 'domain'):
|
elif name in ('server', 'domain', 'host'):
|
||||||
if self._domain is None:
|
if self._domain is None:
|
||||||
self._domain = self._jid.split('@', 1)[-1].split('/', 1)[0]
|
self._domain = self._jid.split('@', 1)[-1].split('/', 1)[0]
|
||||||
return self._domain or ""
|
return self._domain or ""
|
||||||
|
@ -91,7 +91,7 @@ class JID(object):
|
||||||
if name in ('resource', 'user', 'domain'):
|
if name in ('resource', 'user', 'domain'):
|
||||||
object.__setattr__(self, "_%s" % name, value)
|
object.__setattr__(self, "_%s" % name, value)
|
||||||
self.regenerate()
|
self.regenerate()
|
||||||
elif name == 'server':
|
elif name in ('server', 'domain', 'host'):
|
||||||
self.domain = value
|
self.domain = value
|
||||||
elif name in ('full', 'jid'):
|
elif name in ('full', 'jid'):
|
||||||
self.reset(value)
|
self.reset(value)
|
||||||
|
|
Loading…
Reference in a new issue