plugin XEP-0045: room unlocking fix

This commit is contained in:
Goffi 2012-01-22 19:40:04 +01:00
commit 37cc866092

View file

@ -86,11 +86,12 @@ class XEP_0045():
room_jid_s = room.roomJID.userhost()
self.clients[profile].joined_rooms[room_jid_s] = room
if room.status == '201':
if room.locked:
#FIXME: the current behaviour is to create an instant room
#and send the signal only when the room is unlocked
#a proper configuration management should be done
self.clients[profile].configure(room_jid_s).addCallbacks(_sendBridgeSignal, lambda x: error(_('Error while configuring the room')))
print "room locked !"
self.clients[profile].configure(room.roomJID, {}).addCallbacks(_sendBridgeSignal, lambda x: error(_('Error while configuring the room')))
else:
_sendBridgeSignal()
return room