Mercurial > libervia-web
comparison src/browser/sat_browser/contact.py @ 571:f0c8a4d51890
browser_side: print a warning when trying to access a non existing contact box:
This occurs when you receive updatePresence of a MUC occupant before
Libervia knows that this is a MUC. Actually you shouldn't receive presence
update for the occupant before the MUC widget is displayed, this means a
loss of information. One way to fix it is to modify (un)availableReceived
in sat.core.xmpp: check for the entity data "type" or make a disco request
if it doesn't exist, and an attribute to presenceUpdate to tell the
frontend if we have a MUC occupant or a roster contact.
author | souliane <souliane@mailoo.org> |
---|---|
date | Fri, 17 Oct 2014 10:42:10 +0200 |
parents | ee9c7bd266ad |
children | b07f0fe2763a |
comparison
equal
deleted
inserted
replaced
570:2a4e071633f7 | 571:f0c8a4d51890 |
---|---|
519 | 519 |
520 @param jids (list[str]): list of JID | 520 @param jids (list[str]): list of JID |
521 @param groups (list[str]): list of groups | 521 @param groups (list[str]): list of groups |
522 """ | 522 """ |
523 for jid_s in jids: | 523 for jid_s in jids: |
524 self._contact_list.getContactBox(jid_s).setVisible(jid_s in self.connected or self.offlineContactsToShow()) | 524 try: |
525 self._contact_list.getContactBox(jid_s).setVisible(jid_s in self.connected or self.offlineContactsToShow()) | |
526 except TypeError: | |
527 log.warning('No box for contact %s: this code line should not be reached' % jid_s) | |
525 for group in groups: | 528 for group in groups: |
526 self._groupList.getGroupBox(group).setVisible(self.hasVisibleMembers(group) or self.emtyGroupsToShow()) | 529 try: |
530 self._groupList.getGroupBox(group).setVisible(self.hasVisibleMembers(group) or self.emtyGroupsToShow()) | |
531 except TypeError: | |
532 log.warning('No box for group %s: this code line should not be reached' % group) | |
527 | 533 |
528 def refresh(self): | 534 def refresh(self): |
529 """Show or hide disconnected contacts and empty groups""" | 535 """Show or hide disconnected contacts and empty groups""" |
530 self.updateVisibility(self._contact_list.contacts, self.groups.keys()) | 536 self.updateVisibility(self._contact_list.contacts, self.groups.keys()) |