Skip to content

Commit 2845ac7

Browse files
committed
Show world_readable rooms in the room directory
See #271 (comment)
1 parent e480085 commit 2845ac7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

server/lib/matrix-utils/fetch-public-rooms.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,12 @@ async function fetchPublicRooms(
4040
abortSignal,
4141
});
4242

43-
// We only want to see public rooms in the archive
43+
// We only want to see public or world_readable rooms in the archive. A room can be
44+
// world_readable without being public. For example someone might have an invite only
45+
// room where only privileged users are allowed to join and talk but anyone can view
46+
// the room.
4447
const accessibleRooms = publicRoomsRes.chunk.filter((room) => {
45-
// `room.world_readable` is also accessible here but we only use history
46-
// `world_readable` to determine search indexing.
47-
return room.join_rule === 'public';
48+
return room.world_readable || room.join_rule === 'public';
4849
});
4950

5051
return {

0 commit comments

Comments
 (0)