-
Notifications
You must be signed in to change notification settings - Fork 69
Add tests for room creators being able to join v12 room that everyone has left #843
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
Draft
MadLittleMods
wants to merge
1
commit into
main
Choose a base branch
from
madlittlemods/v12-room-creator-rejoin-dead-room
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't expect this to work in other room versions (unless you backdate events to rollback state).
But for v12, the room creator has ultimate power to do whatever and so should be able to send a
m.room.mebershipto join again.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't the reason for empty rooms being unjoinable that you can end up with two independent branches if users from different servers join the empty room? You have no way to know if other users rejoined the same empty room on their own servers. It was never about permissions, so I don't see how this is any different in v12 than previous room versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tulir Unclear. Could that just be a different variant of a fork? That sounds like a plausible technical reason but I've never heard it before. Any prior art/spec about this?
Feels like something that needs to be clarified.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if it has ever been explicitly specified. Might have always been an implicit constraint of servers being expected to use the make/send_join handshake for rooms they're not participating in, which you obviously can't do if there are no servers participating in the room. Though looking at the spec, even that isn't actually specified, https://spec.matrix.org/v1.19/server-server-api/#joining-rooms just says "When the homeserver does not yet know about the room it cannot do this directly." (this = just send a
m.room.memberevent). You could interpret that to mean rooms you've left can be rejoined directly as long as the homeserver hasn't deleted the data from the db, but that'd be bad in terms of causing forks.However, if we were to go with allowing joining empty rooms, I don't see any technical reason why it would have to be limited to room creators. Being a creator doesn't allow bypassing join rules, so you can't join invite-only rooms that way. In public rooms, anyone could send a join event like that, not only creators. The only reason to limit it would be to avoid forks, but if that's the justification, it should probably be limited to the primary creator and not include additional_creators.
Definitely need some spec clarifications, I think it'd be best to just define empty rooms are unjoinable by declaring that servers must use the make/send_join handshake unless they're actually participating in the room (at least 1 local member joined) and explicitly specifying that the handshake requirement leads to empty rooms being permanently unjoinable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmmm, I guess a point against this is literally in MSC4289,
But the MSC doesn't mention join rules at all or how this is surmised.
I'm not sure we really need to prevent forks. Kinda feels the same as the normal disappearing in a submarine for months type of thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that part just means backdating/referencing old events, since auth rules don't allow it even in v12. Has to be considered from a security perspective, but not something that can be used as an actual feature.
I guess if we don't care about that at all, then we could just allow anyone to join empty public rooms (that their server still has in the local database)
IMO we should just forbid joining empty rooms entirely, but if other people think allowing it is better, we can write the spec that way too. I'll make a spec issue and/or PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spec issue is matrix-org/matrix-spec#2415, might make a PR for the forbid joining empty rooms option later