Mercurial > libervia-web
diff 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 |
line wrap: on
line diff
--- a/src/browser/libervia_main.py Fri Oct 17 10:44:06 2014 +0200 +++ b/src/browser/libervia_main.py Fri Oct 17 13:26:33 2014 +0200 @@ -766,11 +766,15 @@ if statuses: self.status_panel.setStatus(statuses.values()[0]) # pylint: disable=E1103 else: - self.contact_panel.setConnected(entity_jid.bare, entity_jid.resource, show, priority, statuses) - if show == 'unavailable': # XXX: save some resources as for now we only need 'unavailable' - for plugin in self.plugins.values(): - if hasattr(plugin, 'presenceReceivedTrigger'): - plugin.presenceReceivedTrigger(entity_jid, show, priority, statuses) + if entity_jid.bare in self.room_list: + wid = self.getLiberviaWidget(panels.ChatPanel, entity_jid.bare, ignoreOtherTabs=False) + else: + wid = self.contact_panel + if show == 'unavailable': # XXX: save some resources as for now we only need 'unavailable' + for plugin in self.plugins.values(): + if hasattr(plugin, 'presenceReceivedTrigger'): + plugin.presenceReceivedTrigger(entity_jid, show, priority, statuses) + wid.setConnected(entity_jid.bare, entity_jid.resource, show, priority, statuses) def _roomJoinedCb(self, room_jid, room_nicks, user_nick): _target = jid.JID(room_jid)