diff src/core/xmpp.py @ 487:e789917fb59d

core: added isJidInRoster method
author Goffi <goffi@goffi.org>
date Fri, 17 Aug 2012 03:07:49 +0200
parents 23cbdf0a0777
children e9634d2e7b38
line wrap: on
line diff
--- a/src/core/xmpp.py	Fri Aug 17 03:07:22 2012 +0200
+++ b/src/core/xmpp.py	Fri Aug 17 03:07:49 2012 +0200
@@ -227,6 +227,10 @@
     def getBareJids(self):
         """Return all bare jids (as unicode) of the roster"""
         return self._jids.keys()
+
+    def isJidInRoster(self, entity_jid):
+        """Return True if jid is in roster"""
+        return entity_jid.userhost() in self._jids
     
     def getItems(self):
         """Return all items of the roster"""