diff --git a/cypress/e2e/invite/invite-dialog.spec.ts b/cypress/e2e/invite/invite-dialog.spec.ts index 80edfa411d6..189cd1690db 100644 --- a/cypress/e2e/invite/invite-dialog.spec.ts +++ b/cypress/e2e/invite/invite-dialog.spec.ts @@ -181,4 +181,13 @@ describe("Invite dialog", function () { // Assert that the message is displayed at the bottom cy.get(".mx_EventTile_last").findByText("Hello").should("exist"); }); + + it("should support pasting one username that is not a mx id or email", () => { + cy.get(".mx_InviteDialog_other").within(() => { + cy.findByTestId("invite-dialog-input").invoke('val', "test"); + cy.findByText("Failed to find the following users").should("not.exist"); + cy.findByTestId("invite-dialog-input").invoke('val', "test,test,test"); + cy.findByText("Failed to find the following users").should("exist"); + }); + }); }); diff --git a/src/components/views/dialogs/InviteDialog.tsx b/src/components/views/dialogs/InviteDialog.tsx index 7bb714c0254..179cfa980fa 100644 --- a/src/components/views/dialogs/InviteDialog.tsx +++ b/src/components/views/dialogs/InviteDialog.tsx @@ -866,11 +866,17 @@ export default class InviteDialog extends React.PureComponent m.userId === address); if (member) {