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

This commit is contained in:
Florian Duros 2024-11-14 17:59:40 +01:00
parent d7ef409df8
commit 6bf06da02c
No known key found for this signature in database
GPG key ID: A5BBB4041B493F15
2 changed files with 13 additions and 13 deletions

View file

@ -605,7 +605,7 @@ describe("<SendMessageComposer/>", () => {
it("should call prepareToEncrypt when the user is typing", async () => {
const cli = stubClient();
cli.isRoomEncrypted = jest.fn().mockReturnValue(true);
jest.spyOn(cli.getCrypto()!, "isEncryptionEnabledInRoom").mockResolvedValue(true);
const room = mkStubRoom("!roomId:server", "Room", cli);
expect(cli.getCrypto()!.prepareToEncrypt).not.toHaveBeenCalled();