mirror of
https://github.com/element-hq/synapse.git
synced 2024-12-20 19:10:45 +03:00
Introduce get_room_state
; a way to get state for a single room
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net>
This commit is contained in:
parent
4a3fec1f3b
commit
b3844451f9
1 changed files with 14 additions and 0 deletions
|
@ -748,6 +748,20 @@ class StatsStore(StateDeltasStore):
|
||||||
"room_state", None, retcols=("name", "topic", "canonical_alias")
|
"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()
|
@cached()
|
||||||
def get_earliest_token_for_stats(self, stats_type, id):
|
def get_earliest_token_for_stats(self, stats_type, id):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue