Only show world_readable
rooms in the room directory
#276
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.
Only show
world_readable
rooms in the room directoryHappens to address part of #271 but made primarily as a follow-up to #239
Dev notes
Only fetch
world_readable
rooms from the room directoryOnly 42% rooms on the
matrix.org
room directory areworld_readable
which means we will get pages of rooms that are half-empty most of the time if we just naively fetch 9 rooms at a time.Ideally, we would be able to just add a filter directly to
/publicRooms
in order to only grab theworld_readable
rooms and still get full pages but the filter option doesn't allow us to slice byworld_readable
history visibility.Instead, we have to paginate until we get a full grid of 9 rooms, then make a final
/publicRooms
request to backtrack to the exact continuation point so next page won't skip any rooms in between.We had empty spaces in the grid before because some rooms in the room directory are private which we filtered out before. But that was a much more rare experience since only 2% of rooms were private .
Room creation -> Room directory lacks read-after-write consistency
Tracked by matrix-org/synapse#15526
This is why we added
waitForResultsInHomeserverRoomDirectory(...)
. We first ran into this problem in #208 (comment)Random
Todo