mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 12:45:03 -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
|
@ -1138,12 +1138,12 @@ class RoomSpaceSummaryRestServlet(RestServlet):
|
|||
|
||||
|
||||
class RoomHierarchyRestServlet(RestServlet):
|
||||
PATTERNS = (
|
||||
PATTERNS = [
|
||||
re.compile(
|
||||
"^/_matrix/client/unstable/org.matrix.msc2946"
|
||||
"^/_matrix/client/(v1|unstable/org.matrix.msc2946)"
|
||||
"/rooms/(?P<room_id>[^/]*)/hierarchy$"
|
||||
),
|
||||
)
|
||||
]
|
||||
|
||||
def __init__(self, hs: "HomeServer"):
|
||||
super().__init__()
|
||||
|
@ -1168,7 +1168,7 @@ class RoomHierarchyRestServlet(RestServlet):
|
|||
)
|
||||
|
||||
return 200, await self._room_summary_handler.get_room_hierarchy(
|
||||
requester.user.to_string(),
|
||||
requester,
|
||||
room_id,
|
||||
suggested_only=parse_boolean(request, "suggested_only", default=False),
|
||||
max_depth=max_depth,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue