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

Specific errcode for when a user invited to a room is already present in the room #1171

Open
Half-Shot opened this issue Jul 15, 2022 · 0 comments · May be fixed by matrix-org/matrix-spec-proposals#3848
Labels
improvement An idea/future MSC for the spec

Comments

@Half-Shot
Copy link
Contributor

Trying to invite a user into a room in which they are already present will give you a pretty generic M_FORBIDDEN. While this is perfectly valid, it does mean applications do not have a spec complaint way to treat this case differently to other errors. The only way to distinguish a failure due to membership conflict and a failure due to other reasons is by checking the error body for a "is already in the room" (in the case of Synapse).

I'd argue that there should be a specific error code for when a membership change was not possible, so applications (such as bridges) trying to ensure membership in a room can short circuit if the error returned tells them that the user is already joined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement An idea/future MSC for the spec
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants