diff options
author | lovetox <philipp@hoerist.com> | 2020-04-17 11:45:01 +0300 |
---|---|---|
committer | lovetox <philipp@hoerist.com> | 2020-04-17 11:45:01 +0300 |
commit | 0783d91395d7441f9a0abb4aa93b520883c842ec (patch) | |
tree | 90c2fbb35a67326981bf2e34f4e96530138f037b | |
parent | 136dfd214497e969fff9073bf270788309e25678 (diff) |
JID: Return correct bare jid
-rw-r--r-- | nbxmpp/protocol.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nbxmpp/protocol.py b/nbxmpp/protocol.py index 527f7e5..79008f3 100644 --- a/nbxmpp/protocol.py +++ b/nbxmpp/protocol.py @@ -895,12 +895,16 @@ class JID: """ Return the bare representation of JID. I.e. string value w/o resource """ + if not self.node: + return self.domain return '%s@%s' % (self.node, self.domain) def getBare(self): """ Return the bare representation of JID. I.e. string value w/o resource """ + if not self.node: + return self.domain return '%s@%s' % (self.node, self.domain) def setBare(self): |