Mercurial > libervia-web
diff src/browser/libervia_main.py @ 572:7a823c6568e2
browser_side: fixes a bug that arrived with the last changes on the JID class (this is related to how pyjamas handle the property decorator)
author | souliane <souliane@mailoo.org> |
---|---|
date | Fri, 17 Oct 2014 10:44:06 +0200 |
parents | cd56f2b0e85b |
children | 12823bcbd05b |
line wrap: on
line diff
--- a/src/browser/libervia_main.py Fri Oct 17 10:42:10 2014 +0200 +++ b/src/browser/libervia_main.py Fri Oct 17 10:44:06 2014 +0200 @@ -774,13 +774,19 @@ def _roomJoinedCb(self, room_jid, room_nicks, user_nick): _target = jid.JID(room_jid) + + # XXX: _target.node.startwith(...) raises an error "startswith is not a function" + # This happens when node a is property defined in the JID class + # FIXME: pyjamas doesn't handle the properties well + node = _target.node + if _target not in self.room_list: self.room_list.append(_target) chat_panel = panels.ChatPanel(self, _target, type_='group') chat_panel.setUserNick(user_nick) - if _target.node.startswith('sat_tarot_'): # XXX: it's not really beautiful, but it works :) + if node.startswith('sat_tarot_'): # XXX: it's not really beautiful, but it works :) self.addTab("Tarot", chat_panel) - elif _target.node.startswith('sat_radiocol_'): + elif node.startswith('sat_radiocol_'): self.addTab("Radio collective", chat_panel) else: self.addTab(_target.node, chat_panel)