mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-06 15:30:27 +03:00
update to provide client context for the widget url's element call endpoint if provided
This commit is contained in:
parent
9d352de995
commit
1629341c08
1 changed files with 3 additions and 1 deletions
|
|
@ -17,6 +17,7 @@ import { MobileFriendlyPageNav } from '../MobileFriendly';
|
||||||
import { SPACE_PATH } from '../paths';
|
import { SPACE_PATH } from '../paths';
|
||||||
import { PowerLevelsContextProvider } from '../../hooks/usePowerLevels';
|
import { PowerLevelsContextProvider } from '../../hooks/usePowerLevels';
|
||||||
import { useSelectedRoom } from '../../hooks/router/useSelectedRoom';
|
import { useSelectedRoom } from '../../hooks/router/useSelectedRoom';
|
||||||
|
import { useClientConfig } from '../../hooks/useClientConfig';
|
||||||
|
|
||||||
interface PersistentCallContainerProps {
|
interface PersistentCallContainerProps {
|
||||||
isVisible: boolean;
|
isVisible: boolean;
|
||||||
|
|
@ -26,6 +27,7 @@ export function PersistentCallContainer({ isVisible }: PersistentCallContainerPr
|
||||||
const { activeCallRoomId, setActiveCallRoomId } = useCallState();
|
const { activeCallRoomId, setActiveCallRoomId } = useCallState();
|
||||||
const mx = useMatrixClient();
|
const mx = useMatrixClient();
|
||||||
const room = useSelectedRoom();
|
const room = useSelectedRoom();
|
||||||
|
const clientConfig = useClientConfig();
|
||||||
|
|
||||||
logger.info(room);
|
logger.info(room);
|
||||||
|
|
||||||
|
|
@ -51,7 +53,7 @@ export function PersistentCallContainer({ isVisible }: PersistentCallContainerPr
|
||||||
};
|
};
|
||||||
|
|
||||||
if (activeCallRoomId && mx?.getUserId()) {
|
if (activeCallRoomId && mx?.getUserId()) {
|
||||||
const newUrl = getWidgetUrl(mx, activeCallRoomId);
|
const newUrl = getWidgetUrl(mx, activeCallRoomId, clientConfig.elementCallUrl ?? '');
|
||||||
const userId = mx.getUserId() ?? '';
|
const userId = mx.getUserId() ?? '';
|
||||||
const app = createVirtualWidget(
|
const app = createVirtualWidget(
|
||||||
mx,
|
mx,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue