Skip to content

Commit 85d2bf3

Browse files
authored
Second batch: remove deprecated calls on MatrixClient (#28227)
* Replace `MatrixClient.forceDiscardSession` call by `MatrixClient.CryptoApi.forceDiscardSession` * Remove `MatrixClient.scheduleAllGroupSessionsForBackup` mock
1 parent e799164 commit 85d2bf3

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/SlashCommands.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ export const Commands = [
727727
isEnabled: (cli) => !isCurrentLocalRoom(cli),
728728
runFn: function (cli, roomId) {
729729
try {
730-
cli.forceDiscardSession(roomId);
730+
cli.getCrypto()?.forceDiscardSession(roomId);
731731
} catch (e) {
732732
return reject(e instanceof Error ? e.message : e);
733733
}

test/test-utils/test-utils.ts

-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ export function createTestClient(): MatrixClient {
166166
});
167167
}),
168168
mxcUrlToHttp: jest.fn().mockImplementation((mxc: string) => `http://this.is.a.url/${mxc.substring(6)}`),
169-
scheduleAllGroupSessionsForBackup: jest.fn().mockResolvedValue(undefined),
170169
setAccountData: jest.fn(),
171170
setRoomAccountData: jest.fn(),
172171
setRoomTopic: jest.fn(),

0 commit comments

Comments
 (0)