diff --git a/src/e2ee/sharedKeyManagement.ts b/src/e2ee/sharedKeyManagement.ts index b83212c1..786727c2 100644 --- a/src/e2ee/sharedKeyManagement.ts +++ b/src/e2ee/sharedKeyManagement.ts @@ -19,7 +19,7 @@ import { useEffect, useMemo } from "react"; import { useEnableE2EE } from "../settings/useSetting"; import { useLocalStorage } from "../useLocalStorage"; import { useClient } from "../ClientContext"; -import { PASSWORD_STRING, useUrlParams } from "../UrlParams"; +import { useUrlParams } from "../UrlParams"; import { widget } from "../widget"; export const getRoomSharedKeyLocalStorageKey = (roomId: string): string => @@ -61,25 +61,10 @@ export const useRoomSharedKey = (roomId: string): string | null => { }; export const useManageRoomSharedKey = (roomId: string): string | null => { - const urlParams = useUrlParams(); - const urlPassword = useKeyFromUrl(roomId); const [e2eeSharedKey] = useInternalRoomSharedKey(roomId); - useEffect(() => { - const hash = location.hash; - - if (!hash.includes("?")) return; - if (!hash.includes(PASSWORD_STRING)) return; - if (urlParams.password !== e2eeSharedKey) return; - - const [hashStart, passwordStart] = hash.split(PASSWORD_STRING); - const hashEnd = passwordStart.split("&").slice(1).join("&"); - - location.replace((hashStart ?? "") + (hashEnd ?? "")); - }, [urlParams, e2eeSharedKey]); - return e2eeSharedKey ?? urlPassword; }; diff --git a/src/home/CallList.tsx b/src/home/CallList.tsx index ac501e41..8bd3778d 100644 --- a/src/home/CallList.tsx +++ b/src/home/CallList.tsx @@ -68,9 +68,11 @@ function CallTile({ name, avatarUrl, room }: CallTileProps) { return (