From 60610d910e91d1821dbeab42cd6c7f0251993e5a Mon Sep 17 00:00:00 2001 From: Nick Mills-Barrett Date: Wed, 25 May 2022 09:30:30 +0100 Subject: [PATCH 1/4] Add the `batch_send` endpoint to generic workers --- docs/workers.md | 1 + synapse/app/generic_worker.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/docs/workers.md b/docs/workers.md index 779069b8177f..64613b78d78c 100644 --- a/docs/workers.md +++ b/docs/workers.md @@ -206,6 +206,7 @@ information. ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/members$ ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/state$ ^/_matrix/client/(v1|unstable/org.matrix.msc2946)/rooms/.*/hierarchy$ + ^/_matrix/client/(v1|unstable/org.matrix.msc2716)/rooms/.*/batch_send$ ^/_matrix/client/unstable/im.nheko.summary/rooms/.*/summary$ ^/_matrix/client/(r0|v3|unstable)/account/3pid$ ^/_matrix/client/(r0|v3|unstable)/devices$ diff --git a/synapse/app/generic_worker.py b/synapse/app/generic_worker.py index 2a9480a5c161..45e084f49fec 100644 --- a/synapse/app/generic_worker.py +++ b/synapse/app/generic_worker.py @@ -78,6 +78,7 @@ read_marker, receipts, room, + room_batch, room_keys, sendtodevice, sync, @@ -308,6 +309,7 @@ def _listen_http(self, listener_config: ListenerConfig) -> None: room.register_servlets(self, resource, is_worker=True) room.register_deprecated_servlets(self, resource) initial_sync.register_servlets(self, resource) + room_batch.register_servlets(self, resource) room_keys.register_servlets(self, resource) tags.register_servlets(self, resource) account_data.register_servlets(self, resource) From 4a3c3614eef2237d7da47f5b59fb5249fe694575 Mon Sep 17 00:00:00 2001 From: Nick Mills-Barrett Date: Wed, 25 May 2022 09:32:35 +0100 Subject: [PATCH 2/4] Add changelog file --- changelog.d/12868.misc | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changelog.d/12868.misc diff --git a/changelog.d/12868.misc b/changelog.d/12868.misc new file mode 100644 index 000000000000..abebc403afe6 --- /dev/null +++ b/changelog.d/12868.misc @@ -0,0 +1,2 @@ +Enable the `batch_send` endpoint on synapse worker processes. Contributed by Nick @ Beeper. + From bd3bc4a0d00e9a341cc4467391aa2cc0d250dd45 Mon Sep 17 00:00:00 2001 From: Nick Mills-Barrett Date: Wed, 25 May 2022 10:24:23 +0100 Subject: [PATCH 3/4] Remove newline from changelog file --- changelog.d/12868.misc | 1 - 1 file changed, 1 deletion(-) diff --git a/changelog.d/12868.misc b/changelog.d/12868.misc index abebc403afe6..382a876dab19 100644 --- a/changelog.d/12868.misc +++ b/changelog.d/12868.misc @@ -1,2 +1 @@ Enable the `batch_send` endpoint on synapse worker processes. Contributed by Nick @ Beeper. - From 7b0b7f3c482e55c0c0d73fcc1b59edecc2cf70f5 Mon Sep 17 00:00:00 2001 From: Nick Mills-Barrett Date: Wed, 25 May 2022 10:27:08 +0100 Subject: [PATCH 4/4] Add batch send endpoint to Docker `event_creator` worker config --- docker/configure_workers_and_start.py | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/configure_workers_and_start.py b/docker/configure_workers_and_start.py index b6ad14117325..f7dac902223f 100755 --- a/docker/configure_workers_and_start.py +++ b/docker/configure_workers_and_start.py @@ -158,6 +158,7 @@ "^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/(join|invite|leave|ban|unban|kick)$", "^/_matrix/client/(api/v1|r0|v3|unstable)/join/", "^/_matrix/client/(api/v1|r0|v3|unstable)/profile/", + "^/_matrix/client/(v1|unstable/org.matrix.msc2716)/rooms/.*/batch_send", ], "shared_extra_conf": {}, "worker_extra_conf": "",