From c93d5230c00d3b1c4d17fc5c33c3e05a080fab72 Mon Sep 17 00:00:00 2001 From: Wessel Date: Mon, 13 Jul 2026 18:06:17 +0200 Subject: [PATCH] Honor `de.sorunome.msc2409.push_ephemeral` flag in appservice handler (#19928) --- changelog.d/19928.bugfix | 1 + synapse/handlers/appservice.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelog.d/19928.bugfix diff --git a/changelog.d/19928.bugfix b/changelog.d/19928.bugfix new file mode 100644 index 0000000000..d69e4febbe --- /dev/null +++ b/changelog.d/19928.bugfix @@ -0,0 +1 @@ +Fix a regression where application services that opted into ephemeral events using the legacy `de.sorunome.msc2409.push_ephemeral` registration flag stopped receiving ephemeral events (including to-device messages used for encryption). Introduced in v1.156.0. diff --git a/synapse/handlers/appservice.py b/synapse/handlers/appservice.py index 36b2f63e41..68b8aa71f1 100644 --- a/synapse/handlers/appservice.py +++ b/synapse/handlers/appservice.py @@ -313,7 +313,10 @@ class ApplicationServicesHandler: StreamKeyType.PRESENCE, StreamKeyType.TO_DEVICE, ) - and service.supports_ephemeral + # Honour both the stable `receive_ephemeral` registration flag and the + # legacy `de.sorunome.msc2409.push_ephemeral` one, matching the + # transaction body built in `ApplicationServiceApi.push_bulk`. + and (service.supports_ephemeral or service.supports_unstable_ephemeral) ) or ( stream_key == StreamKeyType.DEVICE_LIST