Only show `world_readable` rooms in the room directory

Part of https://github.com/matrix-org/matrix-public-archive/issues/271
This commit is contained in:
Eric Eastwood 2023-06-28 17:50:55 -05:00
parent ff18a46283
commit 58d80281bb
1 changed files with 2 additions and 4 deletions

View File

@ -40,11 +40,9 @@ async function fetchPublicRooms(
abortSignal,
});
// We only want to see public rooms in the archive
// We only want to see world_readable rooms in the archive
const accessibleRooms = publicRoomsRes.chunk.filter((room) => {
// `room.world_readable` is also accessible here but we only use history
// `world_readable` to determine search indexing.
return room.join_rule === 'public';
return room.world_readable;
});
return {