Skip room join until we run into a 403 Forbidden and peek into world_readable rooms#272
Draft
MadLittleMods wants to merge 4 commits into
Draft
Skip room join until we run into a 403 Forbidden and peek into world_readable rooms#272MadLittleMods wants to merge 4 commits into
403 Forbidden and peek into world_readable rooms#272MadLittleMods wants to merge 4 commits into
Conversation
Before, it would swallow all of the errors and just return empty data which was fine but now we want it to retry fetching if we weren't in the room yet so we need that 403 error being thrown signal.
403 Forbidden and peek into world_readable rooms
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Skip room join until we run into a
403 Forbiddenand peek intoworld_readableroomsPreviously, we would try to join the room no matter what. Now with this PR, we assume that we are already joined to the room or can peek in the
world_readablecase and only if we get a403 Forbidden, do we go back and try to join the room.This has the effect of the Matrix Public Archive being able to serve content from
world_readablerooms without joining (peeking). And in the case of aworld_readableroom needing invites, will still work (see case mentioned in #271).This prevents the archive bot from joining a room if the server already knows about. We need to join as a fallback no matter what because it's not possible to peek or glean information about a room over federation without joining.
Fix #50
Fix #271
Also related to this discussion in
#matrix-public-archive:matrix.orgGoing further
In order to solve the federated peeking problem to see if a room is
world_readable, we could use MSC3266 room summaries to check whether the room isworld_readableeven over federation.This would prevent joins for rooms on any servers that support MSC3266.
Todo