mirror of
https://github.com/vector-im/element-call.git
synced 2026-08-29 21:15:19 +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 => {
|
export const useIsRoomE2EE = (roomId: string): boolean | null => {
|
||||||
const { client } = useClient();
|
const { client } = useClient();
|
||||||
|
const { token } = useUrlParams();
|
||||||
|
const isRoomForBridgedCall = !!token;
|
||||||
const room = useMemo(() => client?.getRoom(roomId) ?? null, [roomId, client]);
|
const room = useMemo(() => client?.getRoom(roomId) ?? null, [roomId, client]);
|
||||||
// For now, rooms in widget mode are never considered encrypted.
|
// For now, rooms in widget mode are never considered encrypted.
|
||||||
// In the future, when widget mode gains encryption support, then perhaps we
|
// In the future, when widget mode gains encryption support, then perhaps we
|
||||||
// should inspect the e2eEnabled URL parameter here?
|
// should inspect the e2eEnabled URL parameter here?
|
||||||
return useMemo(
|
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