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
path: root/nbxmpp
diff options
context:
space:
mode:
authorPhilipp Hörist <philipp@hoerist.com>2019-12-09 23:08:15 +0300
committerPhilipp Hörist <philipp@hoerist.com>2019-12-09 23:08:15 +0300
commit9fe5483eb06a6fbf7c80eefd64b6b47988fbb6c1 (patch)
tree90588e29499be2037354c2759a12fc55fa062270 /nbxmpp
parenta1589a5e38918bec999c7a4a8d1fa200479aa06e (diff)
JID: isDomain and isFull property
Diffstat (limited to 'nbxmpp')
-rw-r--r--nbxmpp/protocol.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/nbxmpp/protocol.py b/nbxmpp/protocol.py
index aa4fe13..206d65e 100644
--- a/nbxmpp/protocol.py
+++ b/nbxmpp/protocol.py
@@ -897,6 +897,14 @@ class JID:
def isBare(self):
return self.node and self.domain and not self.resource
+ @property
+ def isDomain(self):
+ return self.domain and not self.node and not self.resource
+
+ @property
+ def isFull(self):
+ return self.domain and self.node and self.resource
+
def __eq__(self, other):
"""
Compare the JID to another instance or to string for equality