From 31c7776f039931487a416e3154f2ac217cb1cde3 Mon Sep 17 00:00:00 2001 From: Goffi Date: Fri, 6 Feb 2015 19:02:10 +0100 Subject: [PATCH] quick frontends (QuickContactList): added isEntityInGroup method --- frontends/src/quick_frontend/quick_contact_list.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/frontends/src/quick_frontend/quick_contact_list.py b/frontends/src/quick_frontend/quick_contact_list.py index b39e1f80..dd9dc956 100644 --- a/frontends/src/quick_frontend/quick_contact_list.py +++ b/frontends/src/quick_frontend/quick_contact_list.py @@ -263,6 +263,15 @@ class QuickContactList(QuickWidget): return True return False + def isEntityInGroup(self, entity, group): + """Tell if an entity is in a roster group + + @param entity(jid.JID): jid of the entity + @param group(unicode): group to check + @return (bool): True if the entity is in the group + """ + return entity in self.getGroupData(group, "jids") + def remove(self, entity): """remove a contact from the list