From 5df7e678f7f0f54adc6b6d409c036c90eb994b85 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Sun, 15 Mar 2026 01:22:22 +0200 Subject: [PATCH] matrix-synapse: add an explicit msc4306 feature toggle Expose Synapse's `msc4306_enabled` experimental flag as a first-class MDAD variable and wire it into `homeserver.yaml` alongside the other experimental feature toggles. This makes thread-subscriptions support explicit in playbook configuration, rather than requiring operators to inject the upstream flag via raw `matrix_synapse_configuration_extension_yaml`. The variable intentionally controls only the Synapse feature flag. It does not change the default `thread_subscriptions` worker count, which remains `0` in the standard presets. Keeping those as separate choices avoids auto-starting an experimental worker just because the upstream feature toggle is enabled. Refs: - https://github.com/element-hq/synapse/blob/b99a58719b274fcbb327fd8d7649185792bfd12c/synapse/config/experimental.py#L600-L602 - https://github.com/element-hq/synapse/blob/b99a58719b274fcbb327fd8d7649185792bfd12c/synapse/rest/client/versions.py#L183-L184 --- roles/custom/matrix-synapse/defaults/main.yml | 10 ++++++++++ .../templates/synapse/homeserver.yaml.j2 | 3 +++ 2 files changed, 13 insertions(+) diff --git a/roles/custom/matrix-synapse/defaults/main.yml b/roles/custom/matrix-synapse/defaults/main.yml index 0878877ce..2a62bf5b8 100644 --- a/roles/custom/matrix-synapse/defaults/main.yml +++ b/roles/custom/matrix-synapse/defaults/main.yml @@ -1423,6 +1423,16 @@ matrix_synapse_max_event_delay_duration: 24h # See https://github.com/matrix-org/matrix-spec-proposals/pull/4222 matrix_synapse_experimental_features_msc4222_enabled: false +# Controls whether to enable the MSC4306 experimental feature ("thread subscriptions"). +# +# In current Synapse, this also enables the MSC4308 thread-subscriptions extension +# to Sliding Sync under the same upstream feature flag. +# +# See: +# - https://github.com/matrix-org/matrix-spec-proposals/pull/4306 +# - https://github.com/matrix-org/matrix-spec-proposals/pull/4308 +matrix_synapse_experimental_features_msc4306_enabled: false + # Controls whether to enable the MSC4354 experimental feature (sticky events). # # This is implemented since Synapse v1.148.0 and can be used by element-call v0.17.0+ diff --git a/roles/custom/matrix-synapse/templates/synapse/homeserver.yaml.j2 b/roles/custom/matrix-synapse/templates/synapse/homeserver.yaml.j2 index c29948bd2..055dc9ec8 100644 --- a/roles/custom/matrix-synapse/templates/synapse/homeserver.yaml.j2 +++ b/roles/custom/matrix-synapse/templates/synapse/homeserver.yaml.j2 @@ -3006,6 +3006,9 @@ experimental_features: {% if matrix_synapse_experimental_features_msc4222_enabled %} msc4222_enabled: true {% endif %} + {% if matrix_synapse_experimental_features_msc4306_enabled %} + msc4306_enabled: true + {% endif %} {% if matrix_synapse_experimental_features_msc4354_enabled %} msc4354_enabled: true {% endif %}