Merge pull request #499 from isymchych/fix-auth-dialog

fix authentication dialog
This commit is contained in:
Paweł Domas 2016-02-16 10:48:37 -06:00
commit 61b28fccf2
2 changed files with 10 additions and 5 deletions

View File

@ -193,7 +193,8 @@ class ConferenceConnector {
}, 5000); }, 5000);
// notify user that auth is required // notify user that auth is required
AuthHandler.requireAuth(APP.conference.roomName);
AuthHandler.requireAuth(room, roomLocker.password);
break; break;
case ConferenceErrors.RESERVATION_ERROR: case ConferenceErrors.RESERVATION_ERROR:

View File

@ -54,7 +54,9 @@ function doXmppAuth (room, lockPassword) {
// 4. reallocate focus in current room // 4. reallocate focus in current room
openConnection({id, password}).then(function (connection) { openConnection({id, password}).then(function (connection) {
// open room // open room
let newRoom = connection.initJitsiConference(room.getName()); let newRoom = connection.initJitsiConference(
room.getName(), APP.conference._getConferenceOptions()
);
loginDialog.displayConnectionStatus( loginDialog.displayConnectionStatus(
APP.translation.translateString('connection.FETCH_SESSION_ID') APP.translation.translateString('connection.FETCH_SESSION_ID')
@ -105,20 +107,22 @@ function authenticate (room, lockPassword) {
if (room.isExternalAuthEnabled()) { if (room.isExternalAuthEnabled()) {
doExternalAuth(room, lockPassword); doExternalAuth(room, lockPassword);
} else { } else {
doXmppAuth(); doXmppAuth(room, lockPassword);
} }
} }
/** /**
* Notify user that authentication is required to create the conference. * Notify user that authentication is required to create the conference.
* @param {JitsiConference} room
* @param {string} [lockPassword] password to use if the conference is locked
*/ */
function requireAuth(roomName) { function requireAuth(room, lockPassword) {
if (authRequiredDialog) { if (authRequiredDialog) {
return; return;
} }
authRequiredDialog = LoginDialog.showAuthRequiredDialog( authRequiredDialog = LoginDialog.showAuthRequiredDialog(
roomName, authenticate room.getName(), authenticate.bind(null, room, lockPassword)
); );
} }