|
|
@@ -32,7 +32,7 @@ class Invite {
|
|
32
|
32
|
error);
|
|
33
|
33
|
|
|
34
|
34
|
if (!locked) {
|
|
35
|
|
- this.roomLocker.resetPassword();
|
|
|
35
|
+ this.getRoomLocker().resetPassword();
|
|
36
|
36
|
}
|
|
37
|
37
|
|
|
38
|
38
|
this.setLockedFromElsewhere(locked);
|
|
|
@@ -56,9 +56,10 @@ class Invite {
|
|
56
|
56
|
|
|
57
|
57
|
APP.UI.addListener( UIEvents.PASSWORD_REQUIRED,
|
|
58
|
58
|
() => {
|
|
|
59
|
+ let roomLocker = this.getRoomLocker();
|
|
59
|
60
|
this.setLockedFromElsewhere(true);
|
|
60
|
|
- this.roomLocker.requirePassword().then(() => {
|
|
61
|
|
- let pass = this.roomLocker.password;
|
|
|
61
|
+ roomLocker.requirePassword().then(() => {
|
|
|
62
|
+ let pass = roomLocker.password;
|
|
62
|
63
|
// we received that password is required, but user is trying
|
|
63
|
64
|
// anyway to login without a password, mark room as not
|
|
64
|
65
|
// locked in case he succeeds (maybe someone removed the
|
|
|
@@ -67,7 +68,7 @@ class Invite {
|
|
67
|
68
|
// will be marked as locked.
|
|
68
|
69
|
if (!pass)
|
|
69
|
70
|
this.setLockedFromElsewhere(false);
|
|
70
|
|
- this.conference.join(this.roomLocker.password);
|
|
|
71
|
+ this.conference.join(roomLocker.password);
|
|
71
|
72
|
});
|
|
72
|
73
|
});
|
|
73
|
74
|
}
|
|
|
@@ -129,7 +130,7 @@ class Invite {
|
|
129
|
130
|
* @returns {String} password
|
|
130
|
131
|
*/
|
|
131
|
132
|
getPassword() {
|
|
132
|
|
- return this.roomLocker.password;
|
|
|
133
|
+ return this.getRoomLocker().password;
|
|
133
|
134
|
}
|
|
134
|
135
|
|
|
135
|
136
|
/**
|
|
|
@@ -149,7 +150,7 @@ class Invite {
|
|
149
|
150
|
*/
|
|
150
|
151
|
setRoomUnlocked() {
|
|
151
|
152
|
if (this.isModerator) {
|
|
152
|
|
- this.roomLocker.lock().then(() => {
|
|
|
153
|
+ this.getRoomLocker().lock().then(() => {
|
|
153
|
154
|
APP.UI.emitEvent(UIEvents.TOGGLE_ROOM_LOCK);
|
|
154
|
155
|
this.updateView();
|
|
155
|
156
|
});
|
|
|
@@ -164,8 +165,8 @@ class Invite {
|
|
164
|
165
|
*/
|
|
165
|
166
|
setRoomLocked(newPass) {
|
|
166
|
167
|
let isModerator = this.isModerator;
|
|
167
|
|
- if (isModerator && (newPass || !this.roomLocker.isLocked)) {
|
|
168
|
|
- this.roomLocker.lock(newPass).then(() => {
|
|
|
168
|
+ if (isModerator && (newPass || !this.getRoomLocker().isLocked)) {
|
|
|
169
|
+ this.getRoomLocker().lock(newPass).then(() => {
|
|
169
|
170
|
APP.UI.emitEvent(UIEvents.TOGGLE_ROOM_LOCK);
|
|
170
|
171
|
this.updateView();
|
|
171
|
172
|
});
|
|
|
@@ -187,7 +188,7 @@ class Invite {
|
|
187
|
188
|
* @returns {Boolean} isLocked
|
|
188
|
189
|
*/
|
|
189
|
190
|
isLocked() {
|
|
190
|
|
- return this.roomLocker.isLocked;
|
|
|
191
|
+ return this.getRoomLocker().isLocked;
|
|
191
|
192
|
}
|
|
192
|
193
|
|
|
193
|
194
|
/**
|
|
|
@@ -195,9 +196,10 @@ class Invite {
|
|
195
|
196
|
* @param isLocked
|
|
196
|
197
|
*/
|
|
197
|
198
|
setLockedFromElsewhere(isLocked) {
|
|
198
|
|
- let oldLockState = this.roomLocker.isLocked;
|
|
|
199
|
+ let roomLocker = this.getRoomLocker();
|
|
|
200
|
+ let oldLockState = roomLocker.isLocked;
|
|
199
|
201
|
if (oldLockState !== isLocked) {
|
|
200
|
|
- this.roomLocker.lockedElsewhere = isLocked;
|
|
|
202
|
+ roomLocker.lockedElsewhere = isLocked;
|
|
201
|
203
|
APP.UI.emitEvent(UIEvents.TOGGLE_ROOM_LOCK);
|
|
202
|
204
|
this.updateView();
|
|
203
|
205
|
}
|