From 63f81bf268a67faae5de93d7362590f8d4f575d5 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Wed, 12 Mar 2025 09:12:39 +0200 Subject: [PATCH] Add support for configuring Synapse's MSC4222 (adding `state_after` to sync v2) experimental feature This is required by Element Call. Ref: - https://github.com/element-hq/element-call/blob/93ae2aed9841e0b066d515c56bd4c122d2b591b2/docs/self-hosting.md#a-matrix-homeserver - https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3562 --- roles/custom/matrix-synapse/defaults/main.yml | 8 ++++++++ .../matrix-synapse/templates/synapse/homeserver.yaml.j2 | 3 +++ 2 files changed, 11 insertions(+) diff --git a/roles/custom/matrix-synapse/defaults/main.yml b/roles/custom/matrix-synapse/defaults/main.yml index 113edb498..8e270a749 100644 --- a/roles/custom/matrix-synapse/defaults/main.yml +++ b/roles/custom/matrix-synapse/defaults/main.yml @@ -1275,6 +1275,14 @@ matrix_synapse_experimental_features_msc4140_enabled: false # See `matrix_synapse_experimental_features_msc4140_enabled`. matrix_synapse_max_event_delay_duration: 24h +# Controls whether to enable the MSC4222 experimental feature (adding `state_after` to sync v2). +# +# Allow clients to opt-in to a change of the sync v2 API that allows them to correctly track the state of the room. +# This is required by Element Call to track room state reliably. +# +# See https://github.com/matrix-org/matrix-spec-proposals/pull/4222 +matrix_synapse_experimental_features_msc4222_enabled: false + # Enable this to activate the REST auth password provider module. # See: https://github.com/ma1uta/matrix-synapse-rest-password-provider matrix_synapse_ext_password_provider_rest_auth_enabled: false diff --git a/roles/custom/matrix-synapse/templates/synapse/homeserver.yaml.j2 b/roles/custom/matrix-synapse/templates/synapse/homeserver.yaml.j2 index ebdf323d8..9675bb245 100644 --- a/roles/custom/matrix-synapse/templates/synapse/homeserver.yaml.j2 +++ b/roles/custom/matrix-synapse/templates/synapse/homeserver.yaml.j2 @@ -2990,6 +2990,9 @@ experimental_features: {% if matrix_synapse_experimental_features_msc4140_enabled %} msc4140_enabled: true {% endif %} + {% if matrix_synapse_experimental_features_msc4222_enabled %} + msc4222_enabled: true + {% endif %} {% if matrix_synapse_experimental_features_msc4140_enabled %} max_event_delay_duration: {{ matrix_synapse_max_event_delay_duration | to_json }}