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

Commit 0f55f5f

Browse files
committed
Return a room's current join_rule in each public rooms list entry
1 parent 4de8f3f commit 0f55f5f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

synapse/handlers/room_list.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ def build_room_entry(room):
169169
"world_readable": room["history_visibility"]
170170
== HistoryVisibility.WORLD_READABLE,
171171
"guest_can_join": room["guest_access"] == "can_join",
172+
"join_rule": room["join_rules"],
172173
}
173174

174175
# Filter out Nones – rather omit the field altogether

synapse/storage/databases/main/room.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ async def get_largest_public_rooms(
305305
sql = """
306306
SELECT
307307
room_id, name, topic, canonical_alias, joined_members,
308-
avatar, history_visibility, joined_members, guest_access
308+
avatar, history_visibility, guest_access, join_rules
309309
FROM (
310310
%(published_sql)s
311311
) published

0 commit comments

Comments
 (0)