Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inviting users by ID who aren't on the system silently fails #1597

Closed
matrixbot opened this issue Jun 4, 2016 · 4 comments · Fixed by matrix-org/matrix-react-sdk#2317
Closed
Assignees
Labels
P1 S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect
Milestone

Comments

@matrixbot
Copy link

Created by @ matthew:matrix.org.

If I invite @89y245tr8egfs:matrix.org to a room, surely it should tell me that that user doesn't exist

@ara4n ara4n added T-Defect P1 S-Major Severely degrades major functionality or product features, with no satisfactory workaround labels Jun 18, 2016
@ara4n
Copy link
Member

ara4n commented Jun 18, 2016

@erikjohnston should I be surprised that this doesn't work on synapse?

@ara4n ara4n modified the milestones: ui, UX Fixes Jan 12, 2017
@erikjohnston
Copy link
Member

Clients should be able to do a GET /_matrix/client/r0/profile/<user_id> to check for the existence of users, it will return a 404 if user doesn't exist.

@lukebarnard1
Copy link
Contributor

This looks actionable. Let's poke matrixClient.getProfileInfo when we display tiles in the invite dialog and indicate whether the user could be found. If not, we don't allow the invite to succeed.

@turt2live turt2live assigned turt2live and unassigned ara4n Nov 27, 2018
turt2live added a commit to matrix-org/matrix-react-sdk that referenced this issue Nov 29, 2018
Fixes element-hq/element-web#3283
Fixes element-hq/element-web#3968
Fixes element-hq/element-web#4308
Fixes element-hq/element-web#1597
Fixes element-hq/element-web#6790

This does 3 things:
* Makes the `MultiInviter` check for a user profile before attempting an invite. This is to prove the user exists.
* Use the `MultiInviter` everywhere to avoid duplicating the logic. Although a couple places only invite one user, it is still worthwhile.
* Communicate errors from the `MultiInviter` to the user in all cases. This is done through dialogs, where some existed previously but were not invoked.

Specifically to the 403 error not working: What was happening was the `MultiInviter` loop was setting the `fatal` flag, but that didn't resolve the promise it stored. This caused a promise to always be open, therefore never hitting a dialog.
@turt2live
Copy link
Member

Fixed by matrix-org/matrix-react-sdk#2317

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants