Delete hash once loaded
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
@@ -257,14 +257,13 @@ export function GroupCallView({
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const originalHash = location.hash;
|
const originalHash = location.hash;
|
||||||
let hash = originalHash === "" ? "#" : originalHash;
|
const hash = originalHash === "" ? "#" : originalHash;
|
||||||
hash = hash.split("?password=")[0];
|
const [hashStart, password] = hash.split("?password=");
|
||||||
hash += `?password=${e2eeSharedKey ?? ""}`;
|
|
||||||
|
|
||||||
if (originalHash !== hash) {
|
if (password !== e2eeSharedKey) return;
|
||||||
location.replace(hash);
|
|
||||||
}
|
location.replace(hashStart);
|
||||||
}, [e2eeSharedKey]);
|
}, [password, e2eeSharedKey]);
|
||||||
|
|
||||||
const e2eeConfig = useMemo(
|
const e2eeConfig = useMemo(
|
||||||
() => (e2eeSharedKey ? { sharedKey: e2eeSharedKey } : undefined),
|
() => (e2eeSharedKey ? { sharedKey: e2eeSharedKey } : undefined),
|
||||||
|
|||||||
Reference in New Issue
Block a user