summary refs log tree commit diff
path: root/synapse/handlers/stats.py
diff options
context:
space:
mode:
authorŠimon Brandner <simon.bra.ag@gmail.com>2022-06-29 19:12:45 +0200
committerGitHub <noreply@github.com>2022-06-29 17:12:45 +0000
commit13e359aec8ae8be8dc56a036ae6d9f2bc1d07385 (patch)
tree89e74b3899b5e488e0937876f071f7a7e9375cdd /synapse/handlers/stats.py
parentFix documentation header for `allow_public_rooms_over_federation` (#13116) (diff)
downloadsynapse-13e359aec8ae8be8dc56a036ae6d9f2bc1d07385.tar.xz
Implement MSC3827: Filtering of `/publicRooms` by room type (#13031)
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
Diffstat (limited to 'synapse/handlers/stats.py')
-rw-r--r--synapse/handlers/stats.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/handlers/stats.py b/synapse/handlers/stats.py
index f45e06eb0e..5c01482acf 100644
--- a/synapse/handlers/stats.py
+++ b/synapse/handlers/stats.py
@@ -271,6 +271,9 @@ class StatsHandler:
                 room_state["is_federatable"] = (
                     event_content.get(EventContentFields.FEDERATE, True) is True
                 )
+                room_type = event_content.get(EventContentFields.ROOM_TYPE)
+                if isinstance(room_type, str):
+                    room_state["room_type"] = room_type
             elif typ == EventTypes.JoinRules:
                 room_state["join_rules"] = event_content.get("join_rule")
             elif typ == EventTypes.RoomHistoryVisibility: