Skip to content

Commit 516fd89

Browse files
authored
Use recommended endpoint for MSC3266 requests (#17078)
Keep the existing endpoint for backwards compatibility Signed-off-by: Andrew Ferrazzutti <andrewf@element.io>
1 parent 0ef2315 commit 516fd89

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

changelog.d/17078.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
For MSC3266 room summaries, support queries at the recommended endpoint of `/_matrix/client/unstable/im.nheko.summary/summary/{roomIdOrAlias}`. The existing endpoint of `/_matrix/client/unstable/im.nheko.summary/rooms/{roomIdOrAlias}/summary` is deprecated.

docs/workers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ information.
232232
^/_matrix/client/v1/rooms/.*/hierarchy$
233233
^/_matrix/client/(v1|unstable)/rooms/.*/relations/
234234
^/_matrix/client/v1/rooms/.*/threads$
235-
^/_matrix/client/unstable/im.nheko.summary/rooms/.*/summary$
235+
^/_matrix/client/unstable/im.nheko.summary/summary/.*$
236236
^/_matrix/client/(r0|v3|unstable)/account/3pid$
237237
^/_matrix/client/(r0|v3|unstable)/account/whoami$
238238
^/_matrix/client/(r0|v3|unstable)/devices$

synapse/rest/client/room.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1442,10 +1442,16 @@ async def on_GET(
14421442

14431443
class RoomSummaryRestServlet(ResolveRoomIdMixin, RestServlet):
14441444
PATTERNS = (
1445+
# deprecated endpoint, to be removed
14451446
re.compile(
14461447
"^/_matrix/client/unstable/im.nheko.summary"
14471448
"/rooms/(?P<room_identifier>[^/]*)/summary$"
14481449
),
1450+
# recommended endpoint
1451+
re.compile(
1452+
"^/_matrix/client/unstable/im.nheko.summary"
1453+
"/summary/(?P<room_identifier>[^/]*)$"
1454+
),
14491455
)
14501456
CATEGORY = "Client API requests"
14511457

0 commit comments

Comments
 (0)