diff --git a/src/SlashCommands.tsx b/src/SlashCommands.tsx index 7375cba568..02c2b33849 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); } diff --git a/test/test-utils/test-utils.ts b/test/test-utils/test-utils.ts index d9f4f3f5a6..dd1f47ad6d 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(),