From f28cf0ce699dd2f8391afc9251371754b78746b1 Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 17 Jul 2023 19:16:28 +0100 Subject: [PATCH 1/2] Fix embedded mode This was trying to get the room alias, which causes the config to be read. We don't need the room alias here though, so pass the flag to not return it. --- src/widget.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widget.ts b/src/widget.ts index 93107fcd..fc7e529b 100644 --- a/src/widget.ts +++ b/src/widget.ts @@ -109,7 +109,7 @@ export const widget: WidgetHelpers | null = (() => { baseUrl, e2eEnabled, allowIceFallback, - } = getUrlParams(); + } = getUrlParams(true); if (!roomId) throw new Error("Room ID must be supplied"); if (!userId) throw new Error("User ID must be supplied"); if (!deviceId) throw new Error("Device ID must be supplied"); From c15b2a62d5d8a69a40ebe247d1168233616c1b77 Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 17 Jul 2023 19:22:22 +0100 Subject: [PATCH 2/2] Fix jsdoc --- src/UrlParams.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/UrlParams.ts b/src/UrlParams.ts index f41e3cfa..4a37254a 100644 --- a/src/UrlParams.ts +++ b/src/UrlParams.ts @@ -90,8 +90,10 @@ interface UrlParams { /** * Gets the app parameters for the current URL. - * @param query The URL query string - * @param fragment The URL fragment string + * @param ignoreRoomAlias If true, does not try to parse a room alias from the URL + * @param search The URL search string + * @param pathname The URL path name + * @param hash The URL hash * @returns The app parameters encoded in the URL */ export const getUrlParams = (