diff options
author | Philipp Hörist <philipp@hoerist.com> | 2019-12-09 23:08:15 +0300 |
---|---|---|
committer | Philipp Hörist <philipp@hoerist.com> | 2019-12-09 23:08:15 +0300 |
commit | 9fe5483eb06a6fbf7c80eefd64b6b47988fbb6c1 (patch) | |
tree | 90588e29499be2037354c2759a12fc55fa062270 /nbxmpp | |
parent | a1589a5e38918bec999c7a4a8d1fa200479aa06e (diff) |
JID: isDomain and isFull property
Diffstat (limited to 'nbxmpp')
-rw-r--r-- | nbxmpp/protocol.py | 8 |
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 |