add widgetId to correct pos in getWidgetUrl usage

This commit is contained in:
Gigiaj 2025-05-22 19:43:11 -05:00
parent c6ceb3f977
commit 19f1df798f

View file

@ -65,11 +65,18 @@ export function PersistentCallContainer({ children }: PersistentCallContainerPro
) )
return; return;
const newUrl = getWidgetUrl(mx, roomIdToSet, clientConfig.elementCallUrl ?? '', { const widgetId = `element-call-${roomIdToSet}-${Date.now()}`;
const newUrl = getWidgetUrl(
mx,
roomIdToSet,
clientConfig.elementCallUrl ?? '',
widgetId,
{
skipLobby: skipLobby.toString(), skipLobby: skipLobby.toString(),
returnToLobby: 'true', returnToLobby: 'true',
perParticipentE2EE: 'true', perParticipentE2EE: 'true',
}); }
);
if ( if (
newUrl.toString() === primarySmallWidgetRef?.current?.url || newUrl.toString() === primarySmallWidgetRef?.current?.url ||
@ -91,7 +98,7 @@ export function PersistentCallContainer({ children }: PersistentCallContainerPro
const userId = mx.getUserId() ?? ''; const userId = mx.getUserId() ?? '';
const app = createVirtualWidget( const app = createVirtualWidget(
mx, mx,
`element-call-${roomIdToSet}`, widgetId,
userId, userId,
'Element Call', 'Element Call',
'm.call', 'm.call',
@ -138,7 +145,6 @@ export function PersistentCallContainer({ children }: PersistentCallContainerPro
); );
useEffect(() => { useEffect(() => {
//logger.error(`This is our param: ${isPrimaryIframe}`);
setupWidget(primaryWidgetApiRef, primarySmallWidgetRef, primaryIframeRef, isPrimaryIframe); setupWidget(primaryWidgetApiRef, primarySmallWidgetRef, primaryIframeRef, isPrimaryIframe);
setupWidget(backupWidgetApiRef, backupSmallWidgetRef, backupIframeRef, !isPrimaryIframe); setupWidget(backupWidgetApiRef, backupSmallWidgetRef, backupIframeRef, !isPrimaryIframe);
}, [ }, [