# HG changeset patch # User Goffi # Date 1345165669 -7200 # Node ID e789917fb59df29e188a0484403c7cfba2700d1d # Parent 0d9908ac775ed5a00ba32a30dc4edcc85a7d4d2a core: added isJidInRoster method diff -r 0d9908ac775e -r e789917fb59d src/core/xmpp.py --- 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"""