diff --git a/synapse/storage/stats.py b/synapse/storage/stats.py
index 755faaaaa2..63f0fc5314 100644
--- a/synapse/storage/stats.py
+++ b/synapse/storage/stats.py
@@ -748,6 +748,20 @@ class StatsStore(StateDeltasStore):
"room_state", None, retcols=("name", "topic", "canonical_alias")
)
+ def get_room_state(self, room_id):
+ return self._simple_select_one(
+ "room_state",
+ {"room_id": room_id},
+ retcols=(
+ "name",
+ "topic",
+ "canonical_alias",
+ "avatar",
+ "join_rules",
+ "history_visibility",
+ ),
+ )
+
@cached()
def get_earliest_token_for_stats(self, stats_type, id):
"""
|