Skip to content

Commit

Permalink
Merge pull request jitsi#499 from isymchych/fix-auth-dialog
Browse files Browse the repository at this point in the history
fix authentication dialog
  • Loading branch information
paweldomas committed Feb 16, 2016
2 parents 8d65fcc + 5a1d200 commit 61b28fc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion conference.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ class ConferenceConnector {
}, 5000);

// notify user that auth is required
AuthHandler.requireAuth(APP.conference.roomName);

AuthHandler.requireAuth(room, roomLocker.password);
break;

case ConferenceErrors.RESERVATION_ERROR:
Expand Down
12 changes: 8 additions & 4 deletions modules/UI/authentication/AuthHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ function doXmppAuth (room, lockPassword) {
// 4. reallocate focus in current room
openConnection({id, password}).then(function (connection) {
// open room
let newRoom = connection.initJitsiConference(room.getName());
let newRoom = connection.initJitsiConference(
room.getName(), APP.conference._getConferenceOptions()
);

loginDialog.displayConnectionStatus(
APP.translation.translateString('connection.FETCH_SESSION_ID')
Expand Down Expand Up @@ -105,20 +107,22 @@ function authenticate (room, lockPassword) {
if (room.isExternalAuthEnabled()) {
doExternalAuth(room, lockPassword);
} else {
doXmppAuth();
doXmppAuth(room, lockPassword);
}
}

/**
* 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) {
return;
}

authRequiredDialog = LoginDialog.showAuthRequiredDialog(
roomName, authenticate
room.getName(), authenticate.bind(null, room, lockPassword)
);
}

Expand Down

0 comments on commit 61b28fc

Please sign in to comment.