浏览代码

Passes the room name to connect when using authentication

j8
hristoterezov 9 年前
父节点
当前提交
d6ef36b4b4
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 4
    3
      connection.js

+ 4
- 3
connection.js 查看文件

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;

正在加载...
取消
保存