Skip to content

Commit

Permalink
Second batch: remove deprecated calls on MatrixClient (#28227)
Browse files Browse the repository at this point in the history
* Replace `MatrixClient.forceDiscardSession` call by `MatrixClient.CryptoApi.forceDiscardSession`

* Remove `MatrixClient.scheduleAllGroupSessionsForBackup` mock
  • Loading branch information
florianduros authored Oct 18, 2024
1 parent e799164 commit 85d2bf3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/SlashCommands.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
1 change: 0 additions & 1 deletion test/test-utils/test-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 85d2bf3

Please sign in to comment.