From b0a9e8d1cef3781e33bd8e715e08f8d0d74fc6bf Mon Sep 17 00:00:00 2001 From: Florian Duros Date: Wed, 16 Oct 2024 17:26:53 +0200 Subject: [PATCH 1/2] Replace `MatrixClient.forceDiscardSession` call by `MatrixClient.CryptoApi.forceDiscardSession` --- src/SlashCommands.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SlashCommands.tsx b/src/SlashCommands.tsx index 7375cba568e..02c2b338493 100644 --- a/src/SlashCommands.tsx +++ b/src/SlashCommands.tsx @@ -727,7 +727,7 @@ export const Commands = [ isEnabled: (cli) => !isCurrentLocalRoom(cli), runFn: function (cli, roomId) { try { - cli.forceDiscardSession(roomId); + cli.getCrypto()?.forceDiscardSession(roomId); } catch (e) { return reject(e instanceof Error ? e.message : e); } From 71974f78e8f3b756316a0da33b35c885c92b359f Mon Sep 17 00:00:00 2001 From: Florian Duros Date: Thu, 17 Oct 2024 18:09:21 +0200 Subject: [PATCH 2/2] Remove `MatrixClient.scheduleAllGroupSessionsForBackup` mock --- test/test-utils/test-utils.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/test/test-utils/test-utils.ts b/test/test-utils/test-utils.ts index d9f4f3f5a65..dd1f47ad6d4 100644 --- a/test/test-utils/test-utils.ts +++ b/test/test-utils/test-utils.ts @@ -166,7 +166,6 @@ export function createTestClient(): MatrixClient { }); }), mxcUrlToHttp: jest.fn().mockImplementation((mxc: string) => `http://this.is.a.url/${mxc.substring(6)}`), - scheduleAllGroupSessionsForBackup: jest.fn().mockResolvedValue(undefined), setAccountData: jest.fn(), setRoomAccountData: jest.fn(), setRoomTopic: jest.fn(),