diff options
-rw-r--r-- | slixmpp/jid.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/slixmpp/jid.py b/slixmpp/jid.py index c0143b40..adde95a4 100644 --- a/slixmpp/jid.py +++ b/slixmpp/jid.py @@ -354,6 +354,15 @@ class JID: def bare(self) -> str: return self._bare + @bare.setter + def bare(self, value: str): + node, domain, resource = _parse_jid(value) + assert not resource + self._node = node + self._domain = domain + self._update_bare_full() + + @property def node(self) -> str: return self._node @@ -372,14 +381,6 @@ class JID: self._domain = _validate_domain(value) self._update_bare_full() - @bare.setter - def bare(self, value: str): - node, domain, resource = _parse_jid(value) - assert not resource - self._node = node - self._domain = domain - self._update_bare_full() - @property def resource(self) -> str: return self._resource |