Skip to content

Commit

Permalink
Show world_readable rooms in the room directory
Browse files Browse the repository at this point in the history
  • Loading branch information
MadLittleMods committed Jun 22, 2023
1 parent e480085 commit 2845ac7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions server/lib/matrix-utils/fetch-public-rooms.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 2845ac7

Please sign in to comment.