Passes the room name to connect when using authentication
This commit is contained in:
parent
6b5f6ec704
commit
d6ef36b4b4
|
@ -96,13 +96,14 @@ function connect(id, password, roomName) {
|
||||||
* Show Authentication Dialog and try to connect with new credentials.
|
* Show Authentication Dialog and try to connect with new credentials.
|
||||||
* If failed to connect because of PASSWORD_REQUIRED error
|
* If failed to connect because of PASSWORD_REQUIRED error
|
||||||
* then ask for password again.
|
* then ask for password again.
|
||||||
|
* @param {string} [roomName]
|
||||||
* @returns {Promise<JitsiConnection>}
|
* @returns {Promise<JitsiConnection>}
|
||||||
*/
|
*/
|
||||||
function requestAuth() {
|
function requestAuth(roomName) {
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
let authDialog = LoginDialog.showAuthDialog(
|
let authDialog = LoginDialog.showAuthDialog(
|
||||||
function (id, password) {
|
function (id, password) {
|
||||||
connect(id, password).then(function (connection) {
|
connect(id, password, roomName).then(function (connection) {
|
||||||
authDialog.close();
|
authDialog.close();
|
||||||
resolve(connection);
|
resolve(connection);
|
||||||
}, function (err) {
|
}, function (err) {
|
||||||
|
@ -156,7 +157,7 @@ export function openConnection({id, password, retry, roomName}) {
|
||||||
if (config.token) {
|
if (config.token) {
|
||||||
throw err;
|
throw err;
|
||||||
} else {
|
} else {
|
||||||
return requestAuth();
|
return requestAuth(roomName);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw err;
|
throw err;
|
||||||
|
|
Loading…
Reference in New Issue