|
@@ -263,19 +263,31 @@ Strophe.addConnectionPlugin('emuc', {
|
263
|
263
|
// FIXME: is muc#roomconfig_passwordprotectedroom required?
|
264
|
264
|
this.connection.sendIQ(formsubmit,
|
265
|
265
|
function (res) {
|
266
|
|
- console.log('set room password');
|
|
266
|
+ // password is required
|
|
267
|
+ if (sharedKey)
|
|
268
|
+ {
|
|
269
|
+ console.log('set room password');
|
|
270
|
+ Toolbar.lockLockButton();
|
|
271
|
+ }
|
|
272
|
+ else
|
|
273
|
+ {
|
|
274
|
+ console.log('removed room password');
|
|
275
|
+ Toolbar.unlockLockButton();
|
|
276
|
+ }
|
267
|
277
|
},
|
268
|
278
|
function (err) {
|
269
|
279
|
console.warn('setting password failed', err);
|
270
|
280
|
messageHandler.showError('Lock failed',
|
271
|
281
|
'Failed to lock conference.',
|
272
|
282
|
err);
|
|
283
|
+ setSharedKey('');
|
273
|
284
|
}
|
274
|
285
|
);
|
275
|
286
|
} else {
|
276
|
287
|
console.warn('room passwords not supported');
|
277
|
288
|
messageHandler.showError('Warning',
|
278
|
289
|
'Room passwords are currently not supported.');
|
|
290
|
+ setSharedKey('');
|
279
|
291
|
|
280
|
292
|
}
|
281
|
293
|
},
|
|
@@ -284,6 +296,7 @@ Strophe.addConnectionPlugin('emuc', {
|
284
|
296
|
messageHandler.showError('Lock failed',
|
285
|
297
|
'Failed to lock conference.',
|
286
|
298
|
err);
|
|
299
|
+ setSharedKey('');
|
287
|
300
|
}
|
288
|
301
|
);
|
289
|
302
|
},
|