From 41c9bab8a363415a942a346c56186c9a8002dc03 Mon Sep 17 00:00:00 2001 From: Goffi Date: Fri, 17 Aug 2012 03:07:49 +0200 Subject: [PATCH] core: added isJidInRoster method --- src/core/xmpp.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/xmpp.py b/src/core/xmpp.py index 7cc60980..3a119656 100644 --- a/src/core/xmpp.py +++ b/src/core/xmpp.py @@ -227,6 +227,10 @@ class SatRosterProtocol(xmppim.RosterClientProtocol): 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"""