Fix unfederated invite dialog (#9618)
* clarify error message for unfederated room invites * hide external user suggesetions * rename some descriptors * fix i18n * add warning for unfederated spaces * i18n Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Add tests Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
a306a08780
commit
4ff35f0471
6 changed files with 111 additions and 13 deletions
|
@ -477,4 +477,20 @@ describe("InviteDialog", () => {
|
|||
]);
|
||||
});
|
||||
});
|
||||
|
||||
it("should not suggest users from other server when room has m.federate=false", async () => {
|
||||
SdkConfig.add({ welcome_user_id: "@bot:example.org" });
|
||||
room.currentState.setStateEvents([mkRoomCreateEvent(bobId, roomId, { "m.federate": false })]);
|
||||
|
||||
render(
|
||||
<InviteDialog
|
||||
kind={InviteKind.Invite}
|
||||
roomId={roomId}
|
||||
onFinished={jest.fn()}
|
||||
initialText="@localpart:server.tld"
|
||||
/>,
|
||||
);
|
||||
await flushPromises();
|
||||
expect(screen.queryByText("@localpart:server.tld")).not.toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue