# HG changeset patch # User souliane # Date 1413535446 -7200 # Node ID 7a823c6568e267524c1610b39458c497d02865d9 # Parent f0c8a4d5189063dc5e1447e321f34372c5b5719a 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) diff -r f0c8a4d51890 -r 7a823c6568e2 src/browser/libervia_main.py --- 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)