You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-08-06 10:22:45 +03:00
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:
@@ -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);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user