ソースを参照

rn: support passing serverURL and room to URL object

That's what the SDK passes now, if the room URL is not absolute.
master
Saúl Ibarra Corretgé 6年前
コミット
975ff9c83d
1個のファイルの変更13行の追加1行の削除
  1. 13
    1
      react/features/base/util/uri.js

+ 13
- 1
react/features/base/util/uri.js ファイルの表示

@@ -377,7 +377,19 @@ export function toURLString(obj: ?(Object | string)): ?string {
377 377
  * {@code Object}.
378 378
  */
379 379
 export function urlObjectToString(o: Object): ?string {
380
-    const url = parseStandardURIString(_fixURIStringScheme(o.url || ''));
380
+    // First normalize the given url. It come as o.url or split into o.serverURL
381
+    // and o.room.
382
+    let tmp;
383
+
384
+    if (o.serverURL && o.room) {
385
+        tmp = new URL(o.room, o.serverURL).toString();
386
+    } else if (o.room) {
387
+        tmp = o.room;
388
+    } else {
389
+        tmp = o.url || '';
390
+    }
391
+
392
+    const url = parseStandardURIString(_fixURIStringScheme(tmp));
381 393
 
382 394
     // protocol
383 395
     if (!url.protocol) {

読み込み中…
キャンセル
保存