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

M_CANNOT_LEAVE_SERVER_NOTICE_ROOM is annoying #3549

Closed
freaktechnik opened this issue Dec 7, 2021 · 7 comments
Closed

M_CANNOT_LEAVE_SERVER_NOTICE_ROOM is annoying #3549

freaktechnik opened this issue Dec 7, 2021 · 7 comments
Labels
improvement A suggestion for a relatively simple improvement to the protocol

Comments

@freaktechnik
Copy link

Suggestion
Currently rejecting an invite to a server notice room might error with M_CANNOT_LEAVE_SERVER_NOTICE_ROOM (or might just work fine). At least that's how the spec is worded. As a client it's a pretty bad user experience to have to tell the user that they actually can't reject this invite and that the button offered was a lie. Potential improvements would be to either change the spec to have some clear indicator while the membership is invite that it can't be rejected (like for example never allowing invites to server notice rooms to be rejected) or even better, have home servers join users into those server notice rooms without prompting the user to accept an invite.

@freaktechnik freaktechnik added the improvement A suggestion for a relatively simple improvement to the protocol label Dec 7, 2021
@turt2live
Copy link
Member

Clients can determine if the room is a server notice room with the m.server_notice tag. The spec for server notices is pretty clear in that the room cannot be left, so clients should be able to hide the reject button on these rooms.

Servers can optionally auto-join the user to avoid invites, though this is typically considered a bit too invasive.

@freaktechnik
Copy link
Author

The spec says clients can not expect to be able to reject it, it doesn't say the room can't be left.

@turt2live
Copy link
Member

The common implementation is to prevent leaving as well. The spec says the same error code is used for that, so the client should be able to handle the error gracefully.

@clokep
Copy link
Member

clokep commented Dec 7, 2021

To cross-reference the spec: https://spec.matrix.org/latest/client-server-api/#client-behaviour-28

It says:

The client must not expect to be able to reject an invite to join the server notices room. Attempting to reject the invite must result in a M_CANNOT_LEAVE_SERVER_NOTICE_ROOM error. Servers should not prevent the user leaving the room after joining the server notices room, however the same error code must be used if the server will prevent leaving the room.

If the common implementation is to prevent leaving, shouldn't that simply be specced? It is pretty bad user-experience to attempt an action which is impossible to complete.

@clokep
Copy link
Member

clokep commented Dec 7, 2021

The common implementation is to prevent leaving as well

As far as I can tell Synapse doesn't prevent leaving?

@turt2live
Copy link
Member

it used to, from memory :/

In any case: clients can avoid the error from rejecting the invite by inspecting account data.

@clokep
Copy link
Member

clokep commented Dec 8, 2021

it used to, from memory :/

In any case: clients can avoid the error from rejecting the invite by inspecting account data.

This was changed in May of 2018: matrix-org/synapse#3287.

Regardless, if the intention of the spec is to not allow this, then it should be updated. 🤷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement A suggestion for a relatively simple improvement to the protocol
Projects
None yet
Development

No branches or pull requests

3 participants