Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/python-nbxmpp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlovetox <philipp@hoerist.com>2020-04-17 11:45:01 +0300
committerlovetox <philipp@hoerist.com>2020-04-17 11:45:01 +0300
commit0783d91395d7441f9a0abb4aa93b520883c842ec (patch)
tree90c2fbb35a67326981bf2e34f4e96530138f037b
parent136dfd214497e969fff9073bf270788309e25678 (diff)
JID: Return correct bare jid
-rw-r--r--nbxmpp/protocol.py4
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):