|
@@ -9,10 +9,15 @@ const ConnectionErrors = JitsiMeetJS.errors.connection;
|
9
|
9
|
* Try to open connection using provided credentials.
|
10
|
10
|
* @param {string} [id]
|
11
|
11
|
* @param {string} [password]
|
|
12
|
+ * @param {string} [roomName]
|
12
|
13
|
* @returns {Promise<JitsiConnection>} connection if
|
13
|
14
|
* everything is ok, else error.
|
14
|
15
|
*/
|
15
|
|
-function connect(id, password) {
|
|
16
|
+function connect(id, password, roomName) {
|
|
17
|
+
|
|
18
|
+ let connectionConfig = config;
|
|
19
|
+
|
|
20
|
+ connectionConfig.bosh += '?room=' + roomName;
|
16
|
21
|
let connection = new JitsiMeetJS.JitsiConnection(null, null, config);
|
17
|
22
|
|
18
|
23
|
return new Promise(function (resolve, reject) {
|
|
@@ -82,13 +87,14 @@ function requestAuth() {
|
82
|
87
|
* @param {object} options
|
83
|
88
|
* @param {string} [options.id]
|
84
|
89
|
* @param {string} [options.password]
|
|
90
|
+ * @param {string} [options.roomName]
|
85
|
91
|
* @param {boolean} [retry] if we should show auth dialog
|
86
|
92
|
* on PASSWORD_REQUIRED error.
|
87
|
93
|
*
|
88
|
94
|
* @returns {Promise<JitsiConnection>}
|
89
|
95
|
*/
|
90
|
|
-export function openConnection({id, password, retry}) {
|
91
|
|
- return connect(id, password).catch(function (err) {
|
|
96
|
+export function openConnection({id, password, retry, roomName}) {
|
|
97
|
+ return connect(id, password, roomName).catch(function (err) {
|
92
|
98
|
if (!retry) {
|
93
|
99
|
throw err;
|
94
|
100
|
}
|