added has_jid to roster
This commit is contained in:
parent
e919906c8c
commit
8a22597180
1 changed files with 4 additions and 0 deletions
|
@ -179,6 +179,10 @@ class RosterNode(object):
|
|||
"""Return a list of all subscribed JIDs."""
|
||||
return self._jids.keys()
|
||||
|
||||
def has_jid(self, jid):
|
||||
"""Returns whether the roster has a JID."""
|
||||
return jid in self._jids
|
||||
|
||||
def __iter__(self):
|
||||
"""Iterate over the roster items."""
|
||||
return self._jids.__iter__()
|
||||
|
|
Loading…
Reference in a new issue