mirror of
https://github.com/vector-im/element-web.git
synced 2025-11-17 00:21:08 +01:00
Second batch: remove deprecated calls on MatrixClient (#28227)
* Replace `MatrixClient.forceDiscardSession` call by `MatrixClient.CryptoApi.forceDiscardSession` * Remove `MatrixClient.scheduleAllGroupSessionsForBackup` mock
This commit is contained in:
parent
e79916454f
commit
85d2bf3a04
@ -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);
|
||||
}
|
||||
|
||||
@ -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(),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user