From 275f843afc23bea91b5e4389c963bdc8bf9c6495 Mon Sep 17 00:00:00 2001 From: Timo K Date: Sun, 24 Sep 2023 20:25:29 +0200 Subject: [PATCH] dont encrypt rooms with token login Signed-off-by: Timo K --- src/e2ee/sharedKeyManagement.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/e2ee/sharedKeyManagement.ts b/src/e2ee/sharedKeyManagement.ts index b83212c1..d56aa71b 100644 --- a/src/e2ee/sharedKeyManagement.ts +++ b/src/e2ee/sharedKeyManagement.ts @@ -85,12 +85,17 @@ export const useManageRoomSharedKey = (roomId: string): string | null => { export const useIsRoomE2EE = (roomId: string): boolean | null => { const { client } = useClient(); + const { token } = useUrlParams(); + const isRoomForBridgedCall = !!token; const room = useMemo(() => client?.getRoom(roomId) ?? null, [roomId, client]); // For now, rooms in widget mode are never considered encrypted. // In the future, when widget mode gains encryption support, then perhaps we // should inspect the e2eEnabled URL parameter here? return useMemo( - () => widget === null && (room === null || !room.getCanonicalAlias()), - [room] + () => + !isRoomForBridgedCall && + widget === null && + (room === null || !room.getCanonicalAlias()), + [room, isRoomForBridgedCall] ); };