Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Return a room's current join_rule in each public rooms list entry
Browse files Browse the repository at this point in the history
  • Loading branch information
anoadragon453 committed Jun 9, 2021
1 parent 4de8f3f commit 0f55f5f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions synapse/handlers/room_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ def build_room_entry(room):
"world_readable": room["history_visibility"]
== HistoryVisibility.WORLD_READABLE,
"guest_can_join": room["guest_access"] == "can_join",
"join_rule": room["join_rules"],
}

# Filter out Nones – rather omit the field altogether
Expand Down
2 changes: 1 addition & 1 deletion synapse/storage/databases/main/room.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ async def get_largest_public_rooms(
sql = """
SELECT
room_id, name, topic, canonical_alias, joined_members,
avatar, history_visibility, joined_members, guest_access
avatar, history_visibility, guest_access, join_rules
FROM (
%(published_sql)s
) published
Expand Down

0 comments on commit 0f55f5f

Please sign in to comment.