From c67951f254234cc9338da36c65a4a5e72bd585f1 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 15 Feb 2021 08:54:37 -0700 Subject: [PATCH] Jitsi widget: Read room name from query parameters This is an aesthetic change to the Jitsi widget and has no bearing on the widget's functionality. Paired with https://github.com/matrix-org/matrix-react-sdk/pull/5649 --- src/vector/jitsi/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vector/jitsi/index.ts b/src/vector/jitsi/index.ts index ef3c0f50c7..ba31f3cf08 100644 --- a/src/vector/jitsi/index.ts +++ b/src/vector/jitsi/index.ts @@ -45,6 +45,7 @@ let userId: string; let jitsiAuth: string; let roomId: string; let openIdToken: IOpenIDCredentials; +let roomName: string; let widgetApi: WidgetApi; let meetApi: any; // JitsiMeetExternalAPI @@ -104,6 +105,7 @@ let meetApi: any; // JitsiMeetExternalAPI userId = qsParam('userId'); jitsiAuth = qsParam('auth', true); roomId = qsParam('roomId', true); + roomName = qsParam('roomName', true); if (widgetApi) { await readyPromise; @@ -226,6 +228,7 @@ function joinConference() { // event handler bound in HTML if (displayName) meetApi.executeCommand("displayName", displayName); if (avatarUrl) meetApi.executeCommand("avatarUrl", avatarUrl); if (userId) meetApi.executeCommand("email", userId); + if (roomName) meetApi.executeCommand("subject", roomName); meetApi.on("readyToClose", () => { switchVisibleContainers();