mirror of
https://github.com/vector-im/element-web.git
synced 2026-05-05 12:16:53 +02:00
cater for an undefined MatrixClient on rooms
This commit is contained in:
parent
6606a1142d
commit
9731e275f8
@ -37,7 +37,7 @@ import EventTileBubble from "../messages/EventTileBubble";
|
||||
import { ROOM_SECURITY_TAB } from "../dialogs/RoomSettingsDialog";
|
||||
|
||||
function hasExpectedEncryptionSettings(room): boolean {
|
||||
const isEncrypted: boolean = room._client.isRoomEncrypted(room.roomId);
|
||||
const isEncrypted: boolean = room._client?.isRoomEncrypted(room.roomId);
|
||||
const isPublic: boolean = room.getJoinRule() === "public";
|
||||
return isPublic || !privateShouldBeEncrypted() || isEncrypted;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user