Pārlūkot izejas kodu

Passes the room name to connect when using authentication

master
hristoterezov 9 gadus atpakaļ
vecāks
revīzija
d6ef36b4b4
1 mainītis faili ar 4 papildinājumiem un 3 dzēšanām
  1. 4
    3
      connection.js

+ 4
- 3
connection.js Parādīt failu

96
  * Show Authentication Dialog and try to connect with new credentials.
96
  * Show Authentication Dialog and try to connect with new credentials.
97
  * If failed to connect because of PASSWORD_REQUIRED error
97
  * If failed to connect because of PASSWORD_REQUIRED error
98
  * then ask for password again.
98
  * then ask for password again.
99
+ * @param {string} [roomName]
99
  * @returns {Promise<JitsiConnection>}
100
  * @returns {Promise<JitsiConnection>}
100
  */
101
  */
101
-function requestAuth() {
102
+function requestAuth(roomName) {
102
     return new Promise(function (resolve, reject) {
103
     return new Promise(function (resolve, reject) {
103
         let authDialog = LoginDialog.showAuthDialog(
104
         let authDialog = LoginDialog.showAuthDialog(
104
             function (id, password) {
105
             function (id, password) {
105
-                connect(id, password).then(function (connection) {
106
+                connect(id, password, roomName).then(function (connection) {
106
                     authDialog.close();
107
                     authDialog.close();
107
                     resolve(connection);
108
                     resolve(connection);
108
                 }, function (err) {
109
                 }, function (err) {
156
             if (config.token) {
157
             if (config.token) {
157
                 throw err;
158
                 throw err;
158
             } else {
159
             } else {
159
-                return requestAuth();
160
+                return requestAuth(roomName);
160
             }
161
             }
161
         } else {
162
         } else {
162
             throw err;
163
             throw err;

Notiek ielāde…
Atcelt
Saglabāt