Examine all m.direct rooms to find a DM as fallback (#10127)

This commit is contained in:
Michael Weimann 2023-02-13 08:46:53 +01:00 committed by GitHub
parent 1c6b06bb58
commit a6eee32c66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 147 additions and 32 deletions

View file

@ -53,8 +53,8 @@ describe("findDMRoom", () => {
expect(findDMRoom(mockClient, [member1])).toBe(room1);
});
it("should return null for a single target without a room", () => {
mocked(findDMForUser).mockReturnValue(null);
it("should return undefined for a single target without a room", () => {
mocked(findDMForUser).mockReturnValue(undefined);
expect(findDMRoom(mockClient, [member1])).toBeNull();
});