mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-17 02:10:41 -04:00
Support the stable /hierarchy endpoint from MSC2946 (#11329)
This also makes additional updates where the implementation had drifted from the approved MSC. Unstable endpoints will be removed at a later data.
This commit is contained in:
parent
d08ef6f155
commit
a4521ce0a8
11 changed files with 134 additions and 51 deletions
|
@ -1192,10 +1192,24 @@ class TransportLayerClient:
|
|||
)
|
||||
|
||||
async def get_room_hierarchy(
|
||||
self,
|
||||
destination: str,
|
||||
room_id: str,
|
||||
suggested_only: bool,
|
||||
self, destination: str, room_id: str, suggested_only: bool
|
||||
) -> JsonDict:
|
||||
"""
|
||||
Args:
|
||||
destination: The remote server
|
||||
room_id: The room ID to ask about.
|
||||
suggested_only: if True, only suggested rooms will be returned
|
||||
"""
|
||||
path = _create_v1_path("/hierarchy/%s", room_id)
|
||||
|
||||
return await self.client.get_json(
|
||||
destination=destination,
|
||||
path=path,
|
||||
args={"suggested_only": "true" if suggested_only else "false"},
|
||||
)
|
||||
|
||||
async def get_room_hierarchy_unstable(
|
||||
self, destination: str, room_id: str, suggested_only: bool
|
||||
) -> JsonDict:
|
||||
"""
|
||||
Args:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue