summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream/jid.py
diff options
context:
space:
mode:
Diffstat (limited to 'sleekxmpp/xmlstream/jid.py')
-rw-r--r--sleekxmpp/xmlstream/jid.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/sleekxmpp/xmlstream/jid.py b/sleekxmpp/xmlstream/jid.py
index d8f45b92..5019a25e 100644
--- a/sleekxmpp/xmlstream/jid.py
+++ b/sleekxmpp/xmlstream/jid.py
@@ -71,7 +71,7 @@ class JID(object):
if self._domain is None:
self._domain = self._jid.split('@', 1)[-1].split('/', 1)[0]
return self._domain or ""
- elif name == 'full':
+ elif name in ('full', 'jid'):
return self._jid or ""
elif name == 'bare':
if self._bare is None:
@@ -124,3 +124,9 @@ class JID(object):
def __repr__(self):
return str(self)
+
+ def __eq__(self, other):
+ """
+ Two JIDs are considered equal if they have the same full JID value.
+ """
+ return str(other) == str(self)