mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-07 15:08:24 +00:00
Updates around the use of private fields out of class
This commit is contained in:
@@ -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")}
|
||||||
|
|||||||
Reference in New Issue
Block a user