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

Commit 17f5184

Browse files
committed
r0.6 support: /rooms/:roomId/aliases endpoint
[MSC2432](matrix-org/matrix-spec-proposals#2432) added this endpoint originally but it has since been included in the spec for nearly a year. We can't reasonably remove the unstable endpoint as client implementations still rely on it, and those clients cannot rely on `r0.6.x` appearing in the `/versions` to detect if this stable endpoint exists. It's proposed to introduce a transition period for implementations which may be stuck on the old endpoint of 2 months (minimum). After that point, Synapse can (and should) remove the unstable endpoint without warning. The exact timelines are to be determined by the synapse team, however. This is progress towards #8334
1 parent 5b857b7 commit 17f5184

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

synapse/rest/client/v1/room.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,7 @@ class RoomAliasListServlet(RestServlet):
892892
r"^/_matrix/client/unstable/org\.matrix\.msc2432"
893893
r"/rooms/(?P<room_id>[^/]*)/aliases"
894894
),
895-
]
895+
] + list(client_patterns("/rooms/(?P<room_id>[^/]*)/aliases$"))
896896

897897
def __init__(self, hs: "synapse.server.HomeServer"):
898898
super().__init__()

tests/rest/client/v1/test_rooms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1799,7 +1799,7 @@ def _get_aliases(self, access_token: str, expected_code: int = 200) -> JsonDict:
17991799
"""Calls the endpoint under test. returns the json response object."""
18001800
channel = self.make_request(
18011801
"GET",
1802-
"/_matrix/client/unstable/org.matrix.msc2432/rooms/%s/aliases"
1802+
"/_matrix/client/r0/rooms/%s/aliases"
18031803
% (self.room_id,),
18041804
access_token=access_token,
18051805
)

0 commit comments

Comments
 (0)