mirror of
https://github.com/vector-im/element-call.git
synced 2024-11-15 00:04:59 +08:00
Delete hash once loaded
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
8fdc1e3684
commit
9cd20ed1da
@ -257,14 +257,13 @@ export function GroupCallView({
|
||||
|
||||
useEffect(() => {
|
||||
const originalHash = location.hash;
|
||||
let hash = originalHash === "" ? "#" : originalHash;
|
||||
hash = hash.split("?password=")[0];
|
||||
hash += `?password=${e2eeSharedKey ?? ""}`;
|
||||
const hash = originalHash === "" ? "#" : originalHash;
|
||||
const [hashStart, password] = hash.split("?password=");
|
||||
|
||||
if (originalHash !== hash) {
|
||||
location.replace(hash);
|
||||
}
|
||||
}, [e2eeSharedKey]);
|
||||
if (password !== e2eeSharedKey) return;
|
||||
|
||||
location.replace(hashStart);
|
||||
}, [password, e2eeSharedKey]);
|
||||
|
||||
const e2eeConfig = useMemo(
|
||||
() => (e2eeSharedKey ? { sharedKey: e2eeSharedKey } : undefined),
|
||||
|
Loading…
Reference in New Issue
Block a user