1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-30 02:21:17 +03:00

Element-R: Starting a DMs with a user (#10673)

* Use `cli.getUserDeviceInfo` instead of `cli.downloadKeys` to create a room

* Use `client.getCrypto().getUserDeviceInfo` instead of `client.getUserDeviceInfo`

* Update `createRoom-test.ts` to use `getUserDeviceInfo`

* Remove duplicate  field
This commit is contained in:
Florian Duros
2023-04-24 16:19:08 +02:00
committed by GitHub
parent d7bb8043ea
commit db40479910
3 changed files with 15 additions and 11 deletions

View File

@ -120,6 +120,7 @@ export function createTestClient(): MatrixClient {
downloadKeys: jest.fn(),
},
},
getCrypto: jest.fn().mockReturnValue({ getUserDeviceInfo: jest.fn() }),
getPushActionsForEvent: jest.fn(),
getRoom: jest.fn().mockImplementation((roomId) => mkStubRoom(roomId, "My room", client)),
@ -233,7 +234,6 @@ export function createTestClient(): MatrixClient {
}),
searchUserDirectory: jest.fn().mockResolvedValue({ limited: false, results: [] }),
getCrypto: jest.fn(),
} as unknown as MatrixClient;
client.reEmitter = new ReEmitter(client);