added has_jid to roster
This commit is contained in:
parent
e919906c8c
commit
8a22597180
@ -179,6 +179,10 @@ class RosterNode(object):
|
|||||||
"""Return a list of all subscribed JIDs."""
|
"""Return a list of all subscribed JIDs."""
|
||||||
return self._jids.keys()
|
return self._jids.keys()
|
||||||
|
|
||||||
|
def has_jid(self, jid):
|
||||||
|
"""Returns whether the roster has a JID."""
|
||||||
|
return jid in self._jids
|
||||||
|
|
||||||
def __iter__(self):
|
def __iter__(self):
|
||||||
"""Iterate over the roster items."""
|
"""Iterate over the roster items."""
|
||||||
return self._jids.__iter__()
|
return self._jids.__iter__()
|
||||||
|
Loading…
Reference in New Issue
Block a user