mirror of
https://github.com/vector-im/element-call.git
synced 2026-04-03 07:10:26 +00:00
dont encrypt rooms with token login
Signed-off-by: Timo K <toger5@hotmail.de>
This commit is contained in:
@@ -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]
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user