comparison src/browser/libervia_main.py @ 573:12823bcbd05b

browser_side: display MUC occupants presences
author souliane <souliane@mailoo.org>
date Fri, 17 Oct 2014 13:26:33 +0200
parents 7a823c6568e2
children b07f0fe2763a
comparison
equal deleted inserted replaced
572:7a823c6568e2 573:12823bcbd05b
764 assert(isinstance(self.status_panel, panels.PresenceStatusPanel)) 764 assert(isinstance(self.status_panel, panels.PresenceStatusPanel))
765 self.status_panel.setPresence(show) # pylint: disable=E1103 765 self.status_panel.setPresence(show) # pylint: disable=E1103
766 if statuses: 766 if statuses:
767 self.status_panel.setStatus(statuses.values()[0]) # pylint: disable=E1103 767 self.status_panel.setStatus(statuses.values()[0]) # pylint: disable=E1103
768 else: 768 else:
769 self.contact_panel.setConnected(entity_jid.bare, entity_jid.resource, show, priority, statuses) 769 if entity_jid.bare in self.room_list:
770 if show == 'unavailable': # XXX: save some resources as for now we only need 'unavailable' 770 wid = self.getLiberviaWidget(panels.ChatPanel, entity_jid.bare, ignoreOtherTabs=False)
771 for plugin in self.plugins.values(): 771 else:
772 if hasattr(plugin, 'presenceReceivedTrigger'): 772 wid = self.contact_panel
773 plugin.presenceReceivedTrigger(entity_jid, show, priority, statuses) 773 if show == 'unavailable': # XXX: save some resources as for now we only need 'unavailable'
774 for plugin in self.plugins.values():
775 if hasattr(plugin, 'presenceReceivedTrigger'):
776 plugin.presenceReceivedTrigger(entity_jid, show, priority, statuses)
777 wid.setConnected(entity_jid.bare, entity_jid.resource, show, priority, statuses)
774 778
775 def _roomJoinedCb(self, room_jid, room_nicks, user_nick): 779 def _roomJoinedCb(self, room_jid, room_nicks, user_nick):
776 _target = jid.JID(room_jid) 780 _target = jid.JID(room_jid)
777 781
778 # XXX: _target.node.startwith(...) raises an error "startswith is not a function" 782 # XXX: _target.node.startwith(...) raises an error "startswith is not a function"