Handles case where somebody removed lock of the room while we attempt to join.

Receiving password required, marks the room as locked, but if we try to enter without password, mark it as unlocked till we receive a password required error or we successfully join.
This commit is contained in:
damencho 2016-09-15 16:34:02 -05:00
parent a449223b40
commit 02165786f1
1 changed files with 8 additions and 0 deletions

View File

@ -357,6 +357,14 @@ class ConferenceConnector {
case ConferenceErrors.PASSWORD_REQUIRED: case ConferenceErrors.PASSWORD_REQUIRED:
APP.UI.markRoomLocked(true); APP.UI.markRoomLocked(true);
roomLocker.requirePassword().then(function () { roomLocker.requirePassword().then(function () {
let pass = roomLocker.password;
// we received that password is required, but user is trying
// anyway to login without a password, mark room as not locked
// in case he succeeds (maybe someone removed the password
// meanwhile), if it is still locked another password required
// will be received and the room again will be marked as locked
if (!pass)
APP.UI.markRoomLocked(false);
room.join(roomLocker.password); room.join(roomLocker.password);
}); });
break; break;