comparison frontends/src/quick_frontend/quick_contact_list.py @ 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 faa1129559b8
children 3dc7f61677bb
comparison
equal deleted inserted replaced
1301:afc57b34c0a3 1302:447d28b1b4ec
260 """ 260 """
261 for entity in entities: 261 for entity in entities:
262 if self.entityToShow(entity, check_resources): 262 if self.entityToShow(entity, check_resources):
263 return True 263 return True
264 return False 264 return False
265
266 def isEntityInGroup(self, entity, group):
267 """Tell if an entity is in a roster group
268
269 @param entity(jid.JID): jid of the entity
270 @param group(unicode): group to check
271 @return (bool): True if the entity is in the group
272 """
273 return entity in self.getGroupData(group, "jids")
265 274
266 def remove(self, entity): 275 def remove(self, entity):
267 """remove a contact from the list 276 """remove a contact from the list
268 277
269 @param entity(jid.JID): jid of the entity to remove (bare jid is used) 278 @param entity(jid.JID): jid of the entity to remove (bare jid is used)