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:
parent
d7bb8043ea
commit
db40479910
3 changed files with 15 additions and 11 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue