Allow JID objects to be compared with strings.
Two JIDs match if they have the same full JID value.
This commit is contained in:
parent
8b29431cde
commit
2908751020
1 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue