Mercurial > libervia-backend
changeset 487:e789917fb59d
core: added isJidInRoster method
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 17 Aug 2012 03:07:49 +0200 |
parents | 0d9908ac775e |
children | 6edb4219fcf7 |
files | src/core/xmpp.py |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
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"""