Fix start DM with pending third party invite (#10347)
* Fix start DM with pending third party invite * Make the fix more clearly visible --------- Co-authored-by: Janne Mareike Koschinski <jannemk@element.io> Co-authored-by: Janne Mareike Koschinski <janne@kuschku.de>
This commit is contained in:
parent
102c4e5ae9
commit
d53e91802d
2 changed files with 28 additions and 4 deletions
|
@ -135,6 +135,10 @@ describe("findDMForUser", () => {
|
|||
return [room1.roomId, room2.roomId, room3.roomId, room4.roomId, room5.roomId, unknownRoomId];
|
||||
}
|
||||
|
||||
if (userId === thirdPartyId) {
|
||||
return [room7.roomId];
|
||||
}
|
||||
|
||||
return [];
|
||||
});
|
||||
});
|
||||
|
@ -174,4 +178,8 @@ describe("findDMForUser", () => {
|
|||
it("should find a room with a pending third-party invite", () => {
|
||||
expect(findDMForUser(mockClient, thirdPartyId)).toBe(room7);
|
||||
});
|
||||
|
||||
it("should not find a room for an unknown Id", () => {
|
||||
expect(findDMForUser(mockClient, "@unknown:example.com")).toBe(undefined);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue