You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-31 13:44:28 +03:00
Fix soft crash around inviting invalid MXIDs in start DM on first message flow (#9281)
* Fix soft crash around inviting invalid MXIDs * Make ts --strict happier * Prevent suggesting invalid MXIDs * Add tests * Fix coverage * Fix coverage * Make tsc --strict happier * Fix test * Add tests
This commit is contained in:
committed by
GitHub
parent
4fec436883
commit
4a23630e06
@ -94,6 +94,15 @@ describe('Permalinks', function() {
|
||||
expect(creator.serverCandidates.length).toBe(0);
|
||||
});
|
||||
|
||||
it('should gracefully handle invalid MXIDs', () => {
|
||||
const roomId = "!fake:example.org";
|
||||
const alice50 = makeMemberWithPL(roomId, "@alice:pl_50:org", 50);
|
||||
const room = mockRoom(roomId, [alice50]);
|
||||
const creator = new RoomPermalinkCreator(room);
|
||||
creator.load();
|
||||
expect(creator.serverCandidates).toBeTruthy();
|
||||
});
|
||||
|
||||
it('should pick a candidate server for the highest power level user in the room', function() {
|
||||
const roomId = "!fake:example.org";
|
||||
const alice50 = makeMemberWithPL(roomId, "@alice:pl_50", 50);
|
||||
|
Reference in New Issue
Block a user