Show `world_readable` rooms in the room directory

See https://github.com/matrix-org/matrix-public-archive/issues/271#issuecomment-1602961486
This commit is contained in:
Eric Eastwood 2023-06-22 18:13:51 -05:00
parent e4800852ff
commit 2845ac7ff0
1 changed files with 5 additions and 4 deletions

View File

@ -40,11 +40,12 @@ async function fetchPublicRooms(
abortSignal,
});
// We only want to see public rooms in the archive
// We only want to see public or world_readable rooms in the archive. A room can be
// world_readable without being public. For example someone might have an invite only
// room where only privileged users are allowed to join and talk but anyone can view
// the room.
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 || room.join_rule === 'public';
});
return {