From 2eb023b62392368c5f075804fe27b1d4fa43008a Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Thu, 17 Mar 2022 09:23:44 -0400 Subject: [PATCH 1/8] Fix some worker regexes that are not on api/v1. --- docs/workers.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/workers.md b/docs/workers.md index 8751134e654d..9af84d99f14d 100644 --- a/docs/workers.md +++ b/docs/workers.md @@ -397,23 +397,23 @@ the stream writer for the `typing` stream: The following endpoints should be routed directly to the worker configured as the stream writer for the `to_device` stream: - ^/_matrix/client/(api/v1|r0|v3|unstable)/sendToDevice/ + ^/_matrix/client/(r0|v3|unstable)/sendToDevice/ ##### The `account_data` stream The following endpoints should be routed directly to the worker configured as the stream writer for the `account_data` stream: - ^/_matrix/client/(api/v1|r0|v3|unstable)/.*/tags - ^/_matrix/client/(api/v1|r0|v3|unstable)/.*/account_data + ^/_matrix/client/(r0|v3|unstable)/.*/tags + ^/_matrix/client/(r0|v3|unstable)/.*/account_data ##### The `receipts` stream The following endpoints should be routed directly to the worker configured as the stream writer for the `receipts` stream: - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/receipt - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/read_markers + ^/_matrix/client/(r0|v3|unstable)/rooms/.*/receipt + ^/_matrix/client/(r0|v3|unstable)/rooms/.*/read_markers ##### The `presence` stream @@ -540,7 +540,7 @@ Proxies some frequently-requested client endpoints to add caching and remove load from the main synapse. It can handle REST endpoints matching the following regular expressions: - ^/_matrix/client/(api/v1|r0|v3|unstable)/keys/upload + ^/_matrix/client/(r0|v3|unstable)/keys/upload If `use_presence` is False in the homeserver config, it can also handle REST endpoints matching the following regular expressions: From 9aea94c3a35e80cfaab084a6dfc2516bf2630557 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Thu, 17 Mar 2022 09:26:23 -0400 Subject: [PATCH 2/8] Newsfragment --- changelog.d/12243.doc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/12243.doc diff --git a/changelog.d/12243.doc b/changelog.d/12243.doc new file mode 100644 index 000000000000..37b188e78d94 --- /dev/null +++ b/changelog.d/12243.doc @@ -0,0 +1 @@ +Remove incorrect `api/v1` prefixes in the worker documentation for some endpoints. From 5f6fc1a57342604f3eb5addd61090edbe7fe2d8a Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Wed, 9 Mar 2022 12:59:23 -0500 Subject: [PATCH 3/8] Combine some endpoints. --- docs/workers.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/docs/workers.md b/docs/workers.md index 9af84d99f14d..e2bd37ab0869 100644 --- a/docs/workers.md +++ b/docs/workers.md @@ -200,12 +200,9 @@ information. ^/_matrix/federation/v1/query/ ^/_matrix/federation/v1/make_join/ ^/_matrix/federation/v1/make_leave/ - ^/_matrix/federation/v1/send_join/ - ^/_matrix/federation/v2/send_join/ - ^/_matrix/federation/v1/send_leave/ - ^/_matrix/federation/v2/send_leave/ - ^/_matrix/federation/v1/invite/ - ^/_matrix/federation/v2/invite/ + ^/_matrix/federation/(v1|v2)/send_join/ + ^/_matrix/federation/(v1|v2)/send_leave/ + ^/_matrix/federation/(v1|v2)/invite/ ^/_matrix/federation/v1/query_auth/ ^/_matrix/federation/v1/event_auth/ ^/_matrix/federation/v1/exchange_third_party_invite/ From 47edd8aae31becc672cb2ca5f03595a873584431 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Wed, 9 Mar 2022 13:00:07 -0500 Subject: [PATCH 4/8] v2_alpha no longer exists. --- docs/workers.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/workers.md b/docs/workers.md index e2bd37ab0869..d47b69f2502a 100644 --- a/docs/workers.md +++ b/docs/workers.md @@ -185,8 +185,8 @@ worker: refer to the [stream writers](#stream-writers) section below for further information. # Sync requests - ^/_matrix/client/(v2_alpha|r0|v3)/sync$ - ^/_matrix/client/(api/v1|v2_alpha|r0|v3)/events$ + ^/_matrix/client/(r0|v3)/sync$ + ^/_matrix/client/(api/v1|r0|v3)/events$ ^/_matrix/client/(api/v1|r0|v3)/initialSync$ ^/_matrix/client/(api/v1|r0|v3)/rooms/[^/]+/initialSync$ From f7a2dc9a3e8eb45f71c170c2f4239d9720ba427c Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Wed, 9 Mar 2022 13:01:00 -0500 Subject: [PATCH 5/8] query_auth was removed in MSC2451. --- docs/workers.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/workers.md b/docs/workers.md index d47b69f2502a..e0b7bc95b9bc 100644 --- a/docs/workers.md +++ b/docs/workers.md @@ -203,7 +203,6 @@ information. ^/_matrix/federation/(v1|v2)/send_join/ ^/_matrix/federation/(v1|v2)/send_leave/ ^/_matrix/federation/(v1|v2)/invite/ - ^/_matrix/federation/v1/query_auth/ ^/_matrix/federation/v1/event_auth/ ^/_matrix/federation/v1/exchange_third_party_invite/ ^/_matrix/federation/v1/user/devices/ From 3e269922ecb8ea69949ce97a991dd5536905083d Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Wed, 9 Mar 2022 13:16:10 -0500 Subject: [PATCH 6/8] Remove non-existant api/v1 routes. --- docs/workers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/workers.md b/docs/workers.md index e0b7bc95b9bc..7df924727a37 100644 --- a/docs/workers.md +++ b/docs/workers.md @@ -524,7 +524,7 @@ Note that if a reverse proxy is used , then `/_matrix/media/` must be routed for Handles searches in the user directory. It can handle REST endpoints matching the following regular expressions: - ^/_matrix/client/(api/v1|r0|v3|unstable)/user_directory/search$ + ^/_matrix/client/(r0|v3|unstable)/user_directory/search$ When using this worker you must also set `update_user_directory: False` in the shared configuration file to stop the main synapse running background From a71eb685579aa7632dc96fbeaade22700892cdf9 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Wed, 9 Mar 2022 13:24:43 -0500 Subject: [PATCH 7/8] Add some get-only routes. --- docs/workers.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/workers.md b/docs/workers.md index 7df924727a37..9eb4194e4dcd 100644 --- a/docs/workers.md +++ b/docs/workers.md @@ -270,6 +270,8 @@ information. Additionally, the following REST endpoints can be handled for GET requests: ^/_matrix/federation/v1/groups/ + ^/_matrix/client/(api/v1|r0|v3|unstable)/pushrules/ + ^/_matrix/client/(r0|v3|unstable)/groups/ Pagination requests can also be handled, but all requests for a given room must be routed to the same instance. Additionally, care must be taken to From cf6cfbbfe75a0f7add6be6b6833bfe13056493b2 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Thu, 17 Mar 2022 15:12:33 -0400 Subject: [PATCH 8/8] Newsfragment --- changelog.d/12243.doc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/12243.doc b/changelog.d/12243.doc index 37b188e78d94..b2031f0a4039 100644 --- a/changelog.d/12243.doc +++ b/changelog.d/12243.doc @@ -1 +1 @@ -Remove incorrect `api/v1` prefixes in the worker documentation for some endpoints. +Remove incorrect prefixes in the worker documentation for some endpoints.