Commit 9fe5483e authored by lovetox's avatar lovetox
Browse files

JID: isDomain and isFull property

parent a1589a5e
Loading
Loading
Loading
Loading
+8 −0
Changes for nbxmpp/protocol.py: 8 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -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