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

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

* a line

* another line

* Add getDomain to Jest test
This commit is contained in:
Will Hunt
2025-08-11 08:22:10 +00:00
committed by GitHub
parent d5a9b3f4c0
commit 700068a558
2 changed files with 11 additions and 7 deletions
@@ -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),