Updates around the use of private fields out of class

pull/21833/head
Michael Telatynski 2021-06-18 16:29:10 +01:00
parent 233e2aa425
commit ab94b284b8
1 changed files with 3 additions and 3 deletions

View File

@ -37,8 +37,8 @@ import { privateShouldBeEncrypted } from "../../../createRoom";
import EventTileBubble from "../messages/EventTileBubble"; import EventTileBubble from "../messages/EventTileBubble";
import { ROOM_SECURITY_TAB } from "../dialogs/RoomSettingsDialog"; import { ROOM_SECURITY_TAB } from "../dialogs/RoomSettingsDialog";
function hasExpectedEncryptionSettings(room): boolean { function hasExpectedEncryptionSettings(matrixClient: MatrixClient, room: Room): boolean {
const isEncrypted: boolean = room._client?.isRoomEncrypted(room.roomId); const isEncrypted: boolean = matrixClient.isRoomEncrypted(room.roomId);
const isPublic: boolean = room.getJoinRule() === "public"; const isPublic: boolean = room.getJoinRule() === "public";
return isPublic || !privateShouldBeEncrypted() || isEncrypted; return isPublic || !privateShouldBeEncrypted() || isEncrypted;
} }
@ -195,7 +195,7 @@ const NewRoomIntro = () => {
return <div className="mx_NewRoomIntro"> return <div className="mx_NewRoomIntro">
{ !hasExpectedEncryptionSettings(room) && ( { !hasExpectedEncryptionSettings(cli, room) && (
<EventTileBubble <EventTileBubble
className="mx_cryptoEvent mx_cryptoEvent_icon_warning" className="mx_cryptoEvent mx_cryptoEvent_icon_warning"
title={_t("End-to-end encryption isn't enabled")} title={_t("End-to-end encryption isn't enabled")}