Mercurial > libervia-backend
comparison src/plugins/plugin_xep_0045.py @ 452:fd455b3ca6d4
plugin XEP-0045: room unlocking fix
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 22 Jan 2012 19:40:04 +0100 |
parents | 4f196e2d3781 |
children | cf005701624b |
comparison
equal
deleted
inserted
replaced
451:4f196e2d3781 | 452:fd455b3ca6d4 |
---|---|
84 def _sendBridgeSignal(ignore=None): | 84 def _sendBridgeSignal(ignore=None): |
85 self.host.bridge.roomJoined(room.roomJID.userhost(), [user.nick for user in room.roster.values()], room.nick, profile) | 85 self.host.bridge.roomJoined(room.roomJID.userhost(), [user.nick for user in room.roster.values()], room.nick, profile) |
86 | 86 |
87 room_jid_s = room.roomJID.userhost() | 87 room_jid_s = room.roomJID.userhost() |
88 self.clients[profile].joined_rooms[room_jid_s] = room | 88 self.clients[profile].joined_rooms[room_jid_s] = room |
89 if room.status == '201': | 89 if room.locked: |
90 #FIXME: the current behaviour is to create an instant room | 90 #FIXME: the current behaviour is to create an instant room |
91 #and send the signal only when the room is unlocked | 91 #and send the signal only when the room is unlocked |
92 #a proper configuration management should be done | 92 #a proper configuration management should be done |
93 self.clients[profile].configure(room_jid_s).addCallbacks(_sendBridgeSignal, lambda x: error(_('Error while configuring the room'))) | 93 print "room locked !" |
94 self.clients[profile].configure(room.roomJID, {}).addCallbacks(_sendBridgeSignal, lambda x: error(_('Error while configuring the room'))) | |
94 else: | 95 else: |
95 _sendBridgeSignal() | 96 _sendBridgeSignal() |
96 return room | 97 return room |
97 | 98 |
98 | 99 |