Mercurial > libervia-backend
comparison 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 |
comparison
equal
deleted
inserted
replaced
486:0d9908ac775e | 487:e789917fb59d |
---|---|
225 return self._jids.get(jid.userhost(), None) | 225 return self._jids.get(jid.userhost(), None) |
226 | 226 |
227 def getBareJids(self): | 227 def getBareJids(self): |
228 """Return all bare jids (as unicode) of the roster""" | 228 """Return all bare jids (as unicode) of the roster""" |
229 return self._jids.keys() | 229 return self._jids.keys() |
230 | |
231 def isJidInRoster(self, entity_jid): | |
232 """Return True if jid is in roster""" | |
233 return entity_jid.userhost() in self._jids | |
230 | 234 |
231 def getItems(self): | 235 def getItems(self): |
232 """Return all items of the roster""" | 236 """Return all items of the roster""" |
233 return self._jids.values() | 237 return self._jids.values() |
234 | 238 |