From 075e3728148bb5ec583bfd60b36460744e05bead Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Tue, 14 Feb 2023 13:49:15 +0000 Subject: [PATCH 1/2] Clarify one which workers ThirdPartyRules' on_new_event will run --- docs/modules/third_party_rules_callbacks.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/modules/third_party_rules_callbacks.md b/docs/modules/third_party_rules_callbacks.md index e1a5b6524fb4..888e43bd1051 100644 --- a/docs/modules/third_party_rules_callbacks.md +++ b/docs/modules/third_party_rules_callbacks.md @@ -146,6 +146,9 @@ Note that this callback is called when the event has already been processed and into the room, which means this callback cannot be used to deny persisting the event. To deny an incoming event, see [`check_event_for_spam`](spam_checker_callbacks.md#check_event_for_spam) instead. +For any given event, this callback will be called on every worker process, even if that worker will not end up +acting on that event. This callback will not be called for events that are marked as rejected. + If multiple modules implement this callback, Synapse runs them all in order. ### `check_can_shutdown_room` From 9cde736e99c721f600d2e642c8dd57b96f136d70 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Tue, 14 Feb 2023 13:54:51 +0000 Subject: [PATCH 2/2] changelog --- changelog.d/15071.doc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/15071.doc diff --git a/changelog.d/15071.doc b/changelog.d/15071.doc new file mode 100644 index 000000000000..7fbaba3e8cf0 --- /dev/null +++ b/changelog.d/15071.doc @@ -0,0 +1 @@ +Clarify which worker processes the ThirdPartyRules' [`on_new_event`](https://matrix-org.github.io/synapse/v1.78/modules/third_party_rules_callbacks.html#on_new_event) module API callback runs on. \ No newline at end of file