diff --git a/src/UrlParams.ts b/src/UrlParams.ts index 80f91de0..82a08801 100644 --- a/src/UrlParams.ts +++ b/src/UrlParams.ts @@ -19,7 +19,7 @@ import { useLocation } from "react-router-dom"; import { Config } from "./config/Config"; -const PASSWORD_STRING = "?password="; +export const PASSWORD_STRING = "?password="; interface UrlParams { roomAlias: string | null; diff --git a/src/room/GroupCallView.tsx b/src/room/GroupCallView.tsx index 0726d818..2ab942d3 100644 --- a/src/room/GroupCallView.tsx +++ b/src/room/GroupCallView.tsx @@ -39,7 +39,7 @@ import { Config } from "../config/Config"; import { MuteStates, useMuteStates } from "./MuteStates"; import { useMediaDevices, MediaDevices } from "../livekit/MediaDevicesContext"; import { useRoomSharedKey } from "../e2ee/sharedKeyManagement"; -import { useUrlParams } from "../UrlParams"; +import { PASSWORD_STRING, useUrlParams } from "../UrlParams"; declare global { interface Window { @@ -258,7 +258,7 @@ export function GroupCallView({ useEffect(() => { const originalHash = location.hash; const hash = originalHash === "" ? "#" : originalHash; - const [hashStart, password] = hash.split("?password="); + const [hashStart, password] = hash.split(PASSWORD_STRING); if (password !== e2eeSharedKey) return;