Use userId to filter users in non-federated rooms when showing the InviteDialog (#30364) (#30537)

* Use userId to filter users in non-federated rooms.

* a line

* another line

* Add getDomain to Jest test

(cherry picked from commit 700068a558)

Co-authored-by: Will Hunt <will@half-shot.uk>
This commit is contained in:
ElementRobot
2025-08-11 12:50:40 +02:00
committed by GitHub
parent 4abdb74673
commit e94d690587
2 changed files with 11 additions and 7 deletions

View File

@@ -72,6 +72,7 @@ const expectNoPill = (value: string) => {
expect(getSearchField()).toHaveValue(value);
};
const serverDomain = "example.org";
const roomId = "!111111111111111111:example.org";
const aliceId = "@alice:example.org";
const aliceEmail = "foobar@email.com";
@@ -103,6 +104,7 @@ describe("InviteDialog", () => {
beforeEach(() => {
mockClient = getMockClientWithEventEmitter({
getDomain: jest.fn().mockReturnValue(serverDomain),
getUserId: jest.fn().mockReturnValue(bobId),
getSafeUserId: jest.fn().mockReturnValue(bobId),
isGuest: jest.fn().mockReturnValue(false),