Skip to content

Commit adce8a0

Browse files
authored
Reorganize account data, receipts and presence request regexps in generic_worker docs (#17954)
POST requests for account data, receipts and presence require the worker to be configured as a stream writer. The regular expressions in the default list don't assume any HTTP method, so if the worker is not a stream writer, the request fails. The stream writer section of the documentation lists the same regexps as the one I'm removing, so people configuring stream writers can still configure their routing properly. More context: #17243 (comment)
1 parent 790ce14 commit adce8a0

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

changelog.d/17954.doc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update `synapse.app.generic_worker` documentation to only recommend `GET` requests for stream writer routes by default, unless the worker is also configured as a stream writer. Contributed by @evoL.

docs/workers.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -273,17 +273,6 @@ information.
273273
^/_matrix/client/(api/v1|r0|v3|unstable)/knock/
274274
^/_matrix/client/(api/v1|r0|v3|unstable)/profile/
275275

276-
# Account data requests
277-
^/_matrix/client/(r0|v3|unstable)/.*/tags
278-
^/_matrix/client/(r0|v3|unstable)/.*/account_data
279-
280-
# Receipts requests
281-
^/_matrix/client/(r0|v3|unstable)/rooms/.*/receipt
282-
^/_matrix/client/(r0|v3|unstable)/rooms/.*/read_markers
283-
284-
# Presence requests
285-
^/_matrix/client/(api/v1|r0|v3|unstable)/presence/
286-
287276
# User directory search requests
288277
^/_matrix/client/(r0|v3|unstable)/user_directory/search$
289278

@@ -292,6 +281,13 @@ Additionally, the following REST endpoints can be handled for GET requests:
292281
^/_matrix/client/(api/v1|r0|v3|unstable)/pushrules/
293282
^/_matrix/client/unstable/org.matrix.msc4140/delayed_events
294283

284+
# Account data requests
285+
^/_matrix/client/(r0|v3|unstable)/.*/tags
286+
^/_matrix/client/(r0|v3|unstable)/.*/account_data
287+
288+
# Presence requests
289+
^/_matrix/client/(api/v1|r0|v3|unstable)/presence/
290+
295291
Pagination requests can also be handled, but all requests for a given
296292
room must be routed to the same instance. Additionally, care must be taken to
297293
ensure that the purge history admin API is not used while pagination requests

0 commit comments

Comments
 (0)