comparison frontends/src/quick_frontend/quick_contact_list.py @ 1377:017270e6eea4

quick_frontends, primitivus: know who are the MUC occupants from the presence informations: - QuickChat.occupants is now a property using cached information - some MUC handlers are no more needed, the presence handler is enough
author souliane <souliane@mailoo.org>
date Fri, 20 Mar 2015 16:25:38 +0100
parents ec9e58357a07
children 1276e6a0716b
comparison
equal deleted inserted replaced
1376:28fd9e838f8f 1377:017270e6eea4
401 resource_data[C.PRESENCE_PRIORITY] = int(priority) 401 resource_data[C.PRESENCE_PRIORITY] = int(priority)
402 resource_data[C.PRESENCE_STATUSES] = statuses 402 resource_data[C.PRESENCE_STATUSES] = statuses
403 403
404 priority_resource = max(resources_data, key=lambda res: resources_data[res][C.PRESENCE_PRIORITY]) 404 priority_resource = max(resources_data, key=lambda res: resources_data[res][C.PRESENCE_PRIORITY])
405 cache[C.CONTACT_MAIN_RESOURCE] = priority_resource 405 cache[C.CONTACT_MAIN_RESOURCE] = priority_resource
406 self.update()
406 407
407 def onNickUpdate(self, entity, new_nick, profile): 408 def onNickUpdate(self, entity, new_nick, profile):
408 """Update entity's nick 409 """Update entity's nick
409 410
410 @param entity(jid.JID): entity updated 411 @param entity(jid.JID): entity updated