summary refs log tree commit diff
path: root/synapse/rest
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2021-11-29 14:32:20 -0500
committerGitHub <noreply@github.com>2021-11-29 14:32:20 -0500
commita4521ce0a8d252e77ca8bd261ecf40ba67511a31 (patch)
tree44c545e9105a04929c01c8ad9cf8ce4a3c198d11 /synapse/rest
parentMake background updates controllable via a plugin (#11306) (diff)
downloadsynapse-a4521ce0a8d252e77ca8bd261ecf40ba67511a31.tar.xz
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.
Diffstat (limited to 'synapse/rest')
-rw-r--r--synapse/rest/client/room.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/rest/client/room.py b/synapse/rest/client/room.py
index 955d4e8641..73d0f7c950 100644
--- a/synapse/rest/client/room.py
+++ b/synapse/rest/client/room.py
@@ -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,