浏览代码

Merge pull request #884 from jitsi/updates-lock-room

Updates lock room
j8
yanas 8 年前
父节点
当前提交
531e3d2765
共有 2 个文件被更改,包括 12 次插入0 次删除
  1. 8
    0
      conference.js
  2. 4
    0
      modules/UI/authentication/RoomLocker.js

+ 8
- 0
conference.js 查看文件

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

+ 4
- 0
modules/UI/authentication/RoomLocker.js 查看文件

@@ -185,6 +185,10 @@ export default function createRoomLocker (room) {
185 185
                 newPass => { password = newPass; }
186 186
             ).catch(
187 187
                 reason => {
188
+                    // user canceled, no pass was entered.
189
+                    // clear, as if we use the same instance several times
190
+                    // pass stays between attempts
191
+                    password = null;
188 192
                     if (reason !== APP.UI.messageHandler.CANCEL)
189 193
                         console.error(reason);
190 194
                 }

正在加载...
取消
保存