comparison browser_side/contact.py @ 271:d868181d0649

browser_side: update contacts in "group and contact chooser" when the a user connect/disconnect
author souliane <souliane@mailoo.org>
date Tue, 19 Nov 2013 21:21:49 +0100
parents a76243c02074
children 0cb9869b42b6
comparison
equal deleted inserted replaced
270:52e60dd2bc43 271:d868181d0649
302 if not self.connected.has_key(jid): 302 if not self.connected.has_key(jid):
303 self.connected[jid] = {} 303 self.connected[jid] = {}
304 self.connected[jid][resource] = (availability, priority, statuses) 304 self.connected[jid][resource] = (availability, priority, statuses)
305 self._contact_list.setState(jid, "availability", availability) 305 self._contact_list.setState(jid, "availability", availability)
306 306
307 # update the connected contacts chooser live
308 if hasattr(self.host, "room_contacts_chooser") and self.host.room_contacts_chooser is not None:
309 self.host.room_contacts_chooser.resetContacts()
310
307 def setContactMessageWaiting(self, jid, waiting): 311 def setContactMessageWaiting(self, jid, waiting):
308 """Show an visual indicator that contact has send a message 312 """Show an visual indicator that contact has send a message
309 @param jid: jid of the contact 313 @param jid: jid of the contact
310 @param waiting: True if message are waiting""" 314 @param waiting: True if message are waiting"""
311 self._contact_list.setState(jid, "messageWaiting", waiting) 315 self._contact_list.setState(jid, "messageWaiting", waiting)