From a9244c8c5e4a4d35ae5f468c95f73aacf40760f9 Mon Sep 17 00:00:00 2001 From: Andrew Ferrazzutti Date: Mon, 9 Dec 2024 11:54:21 -0500 Subject: [PATCH 1/2] Don't ratelimit server-sent delayed events When the server sends a delayed event upon timeout / on-demand sending, don't apply ratelimiting to the event create+send attempt, because it is a send that the server expects to be able to send. What should (and does) get rate-limited are client requests to manage delayed events. --- synapse/handlers/delayed_events.py | 1 + 1 file changed, 1 insertion(+) diff --git a/synapse/handlers/delayed_events.py b/synapse/handlers/delayed_events.py index 3c88a96fd3f..2b971640559 100644 --- a/synapse/handlers/delayed_events.py +++ b/synapse/handlers/delayed_events.py @@ -467,6 +467,7 @@ async def _send_event( requester, event_dict, txn_id=txn_id, + ratelimit=False, ) event_id = sent_event.event_id except ShadowBanError: From 579b1309df631a2f05f3ff3099459a7cc8544998 Mon Sep 17 00:00:00 2001 From: Andrew Ferrazzutti Date: Mon, 9 Dec 2024 11:58:21 -0500 Subject: [PATCH 2/2] Add changelog --- changelog.d/18018.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/18018.bugfix diff --git a/changelog.d/18018.bugfix b/changelog.d/18018.bugfix new file mode 100644 index 00000000000..019ee45d1fa --- /dev/null +++ b/changelog.d/18018.bugfix @@ -0,0 +1 @@ +Don't apply ratelimiting on the sending of delayed events by the server.