Replace MatrixClient.isRoomEncrypted by MatrixClient.CryptoApi.isEncryptionEnabledInRoom in EventTile.tsx

This commit is contained in:
Florian Duros 2024-11-21 10:31:55 +01:00
parent b907ec380f
commit dc53178ea6
No known key found for this signature in database
GPG key ID: A5BBB4041B493F15
4 changed files with 60 additions and 4 deletions

View file

@ -32,6 +32,7 @@ import {
mkEvent,
mkMessage,
mkStubRoom,
mockClientMethodsCrypto,
mockPlatformPeg,
} from "../../../../test-utils";
import { TILE_SERVER_WK_KEY } from "../../../../../src/utils/WellKnownUtils";
@ -67,7 +68,6 @@ describe("ForwardDialog", () => {
getAccountData: jest.fn().mockReturnValue(accountDataEvent),
getPushActionsForEvent: jest.fn(),
mxcUrlToHttp: jest.fn().mockReturnValue(""),
isRoomEncrypted: jest.fn().mockReturnValue(false),
getProfileInfo: jest.fn().mockResolvedValue({
displayname: "Alice",
}),
@ -76,6 +76,7 @@ describe("ForwardDialog", () => {
getClientWellKnown: jest.fn().mockReturnValue({
[TILE_SERVER_WK_KEY.name]: { map_style_url: "maps.com" },
}),
...mockClientMethodsCrypto(),
});
const defaultRooms = ["a", "A", "b"].map((name) => mkStubRoom(name, name, mockClient));