From 19f1df798f6ac45e6aee1f313ef2a2a992bcf0ae Mon Sep 17 00:00:00 2001 From: Gigiaj Date: Thu, 22 May 2025 19:43:11 -0500 Subject: [PATCH] add widgetId to correct pos in getWidgetUrl usage --- .../pages/call/PersistentCallContainer.tsx | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/app/pages/call/PersistentCallContainer.tsx b/src/app/pages/call/PersistentCallContainer.tsx index af3e3e6b..0a8b3c5d 100644 --- a/src/app/pages/call/PersistentCallContainer.tsx +++ b/src/app/pages/call/PersistentCallContainer.tsx @@ -65,11 +65,18 @@ export function PersistentCallContainer({ children }: PersistentCallContainerPro ) return; - const newUrl = getWidgetUrl(mx, roomIdToSet, clientConfig.elementCallUrl ?? '', { - skipLobby: skipLobby.toString(), - returnToLobby: 'true', - perParticipentE2EE: 'true', - }); + const widgetId = `element-call-${roomIdToSet}-${Date.now()}`; + const newUrl = getWidgetUrl( + mx, + roomIdToSet, + clientConfig.elementCallUrl ?? '', + widgetId, + { + skipLobby: skipLobby.toString(), + returnToLobby: 'true', + perParticipentE2EE: 'true', + } + ); if ( newUrl.toString() === primarySmallWidgetRef?.current?.url || @@ -91,7 +98,7 @@ export function PersistentCallContainer({ children }: PersistentCallContainerPro const userId = mx.getUserId() ?? ''; const app = createVirtualWidget( mx, - `element-call-${roomIdToSet}`, + widgetId, userId, 'Element Call', 'm.call', @@ -138,7 +145,6 @@ export function PersistentCallContainer({ children }: PersistentCallContainerPro ); useEffect(() => { - //logger.error(`This is our param: ${isPrimaryIframe}`); setupWidget(primaryWidgetApiRef, primarySmallWidgetRef, primaryIframeRef, isPrimaryIframe); setupWidget(backupWidgetApiRef, backupSmallWidgetRef, backupIframeRef, !isPrimaryIframe); }, [