changeset 303:6ce8515ee8f5

browser_side: fix internal JID class equality operator
author souliane <souliane@mailoo.org>
date Wed, 18 Dec 2013 09:51:10 +0100
parents 6e36b44cbd34
children 2ab513a47e3b
files browser_side/jid.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/browser_side/jid.py	Wed Dec 18 08:59:44 2013 +0100
+++ b/browser_side/jid.py	Wed Dec 18 09:51:10 2013 +0100
@@ -50,3 +50,7 @@
         """return True if the jid is xmpp compliant"""
         #FIXME: always return True for the moment
         return True
+
+    def __eq__(self, other):
+        """Redefine equality operator to implement the naturally expected test"""
+        return self.node == other.node and self.domain == other.domain and self.resource == other.resource