From 8a22597180cd9ec672515218aed1abe3529d2104 Mon Sep 17 00:00:00 2001 From: Nathan Fritz Date: Fri, 15 Apr 2011 17:43:12 -0700 Subject: [PATCH] added has_jid to roster --- sleekxmpp/roster.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sleekxmpp/roster.py b/sleekxmpp/roster.py index 23764f8..1972a92 100644 --- a/sleekxmpp/roster.py +++ b/sleekxmpp/roster.py @@ -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__()