update to provide client context for the widget url's element call endpoint if provided

This commit is contained in:
Gigiaj 2025-04-16 20:53:10 -05:00
parent 9d352de995
commit 1629341c08

View file

@ -17,6 +17,7 @@ import { MobileFriendlyPageNav } from '../MobileFriendly';
import { SPACE_PATH } from '../paths';
import { PowerLevelsContextProvider } from '../../hooks/usePowerLevels';
import { useSelectedRoom } from '../../hooks/router/useSelectedRoom';
import { useClientConfig } from '../../hooks/useClientConfig';
interface PersistentCallContainerProps {
isVisible: boolean;
@ -26,6 +27,7 @@ export function PersistentCallContainer({ isVisible }: PersistentCallContainerPr
const { activeCallRoomId, setActiveCallRoomId } = useCallState();
const mx = useMatrixClient();
const room = useSelectedRoom();
const clientConfig = useClientConfig();
logger.info(room);
@ -51,7 +53,7 @@ export function PersistentCallContainer({ isVisible }: PersistentCallContainerPr
};
if (activeCallRoomId && mx?.getUserId()) {
const newUrl = getWidgetUrl(mx, activeCallRoomId);
const newUrl = getWidgetUrl(mx, activeCallRoomId, clientConfig.elementCallUrl ?? '');
const userId = mx.getUserId() ?? '';
const app = createVirtualWidget(
mx,