From 58d80281bb99ed74e686c05e74c437fa3d9a48cf Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Wed, 28 Jun 2023 17:50:55 -0500 Subject: [PATCH] Only show `world_readable` rooms in the room directory Part of https://github.com/matrix-org/matrix-public-archive/issues/271 --- server/lib/matrix-utils/fetch-public-rooms.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/server/lib/matrix-utils/fetch-public-rooms.js b/server/lib/matrix-utils/fetch-public-rooms.js index bc9e7c5..a76f747 100644 --- a/server/lib/matrix-utils/fetch-public-rooms.js +++ b/server/lib/matrix-utils/fetch-public-rooms.js @@ -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 {