changeset 1302:447d28b1b4ec frontends_multi_profiles

quick frontends (QuickContactList): added isEntityInGroup method
author Goffi <goffi@goffi.org>
date Fri, 06 Feb 2015 19:02:10 +0100
parents afc57b34c0a3
children d3ef3894254d
files frontends/src/quick_frontend/quick_contact_list.py
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/frontends/src/quick_frontend/quick_contact_list.py	Fri Feb 06 19:01:06 2015 +0100
+++ b/frontends/src/quick_frontend/quick_contact_list.py	Fri Feb 06 19:02:10 2015 +0100
@@ -263,6 +263,15 @@
                 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