Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit b4ad0bf

Browse files
committed
Support the stable endpoint for Client-Server requests.
1 parent 283cccd commit b4ad0bf

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

docs/workers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ expressions:
223223
^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/members$
224224
^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/state$
225225
^/_matrix/client/unstable/org.matrix.msc2946/rooms/.*/spaces$
226-
^/_matrix/client/unstable/org.matrix.msc2946/rooms/.*/hierarchy$
226+
^/_matrix/client/(v1|unstable/org.matrix.msc2946)/rooms/.*/hierarchy$
227227
^/_matrix/client/unstable/im.nheko.summary/rooms/.*/summary$
228228
^/_matrix/client/(api/v1|r0|v3|unstable)/account/3pid$
229229
^/_matrix/client/(api/v1|r0|v3|unstable)/devices$

synapse/app/homeserver.py

+1
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ def _configure_named_resource(
194194
{
195195
"/_matrix/client/api/v1": client_resource,
196196
"/_matrix/client/r0": client_resource,
197+
"/_matrix/client/v1": client_resource,
197198
"/_matrix/client/v3": client_resource,
198199
"/_matrix/client/unstable": client_resource,
199200
"/_matrix/client/v2_alpha": client_resource,

synapse/rest/client/room.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1138,11 +1138,15 @@ async def on_POST(
11381138

11391139

11401140
class RoomHierarchyRestServlet(RestServlet):
1141-
PATTERNS = (
1141+
PATTERNS = [
11421142
re.compile(
11431143
"^/_matrix/client/unstable/org.matrix.msc2946"
11441144
"/rooms/(?P<room_id>[^/]*)/hierarchy$"
11451145
),
1146+
] + list(
1147+
client_patterns(
1148+
"/rooms/(?P<room_id>[^/]*)/hierarchy$", releases=("v1",), unstable=False
1149+
)
11461150
)
11471151

11481152
def __init__(self, hs: "HomeServer"):

0 commit comments

Comments
 (0)