From 6077c7a1d6891b86242203ca771a81db0c9fc431 Mon Sep 17 00:00:00 2001 From: Catalan Lover Date: Fri, 14 Mar 2025 14:48:16 +0100 Subject: [PATCH 1/2] Fix bug in marking Pantal and Rust Crypto as mutually exclusive. --- .../matrix-bot-draupnir/tasks/validate_config.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/roles/custom/matrix-bot-draupnir/tasks/validate_config.yml b/roles/custom/matrix-bot-draupnir/tasks/validate_config.yml index c5816ea51..e40178cef 100644 --- a/roles/custom/matrix-bot-draupnir/tasks/validate_config.yml +++ b/roles/custom/matrix-bot-draupnir/tasks/validate_config.yml @@ -45,9 +45,17 @@ with_items: - {'name': 'matrix_bot_draupnir_config_accessToken', when: "{{ matrix_bot_draupnir_pantalaimon_use }}"} - {'name': 'matrix_bot_draupnir_config_accessToken', when: "{{ matrix_bot_draupnir_login_native }}"} - - {'name': 'matrix_bot_draupnir_pantalaimon_use', when: "{{ matrix_bot_draupnir_config_experimentalRustCrypto }}"} when: "item.when | bool and not (vars[item.name] == '' or vars[item.name] is none)" +- name: Fail when matrix_bot_draupnir_config_experimentalRustCrypto is enabled together with matrix_bot_draupnir_pantalaimon_use + ansible.builtin.fail: + msg: >- + Your configuration is trying to enable matrix_bot_draupnir_config_experimentalRustCrypto and matrix_bot_draupnir_pantalaimon_use at the same time. + These settings are mutually incompatible and therefore cant be used at the same time. + when: + - matrix_bot_draupnir_pantalaimon_use + - matrix_bot_draupnir_config_experimentalRustCrypto + - when: "matrix_bot_draupnir_pantalaimon_use == 'true' and matrix_bot_draupnir_pantalaimon_breakage_ignore == 'false'" block: - name: Inject warning if Pantalaimon is used together with Draupnir From 60e2e035a220f962535edad9c519be4bd5a5dde9 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Fri, 14 Mar 2025 22:28:12 +0200 Subject: [PATCH 2/2] Add `matrix_synapse_rc_delayed_event_mgmt` variable Ref: - https://github.com/element-hq/element-call/blob/c4747dd1776b7ad034e61b7723316c975bdd3470/docs/self-hosting.md#a-matrix-homeserver - https://github.com/element-hq/element-call/commit/e39fe3bc7f6b35c5c70665b8527cde3b3d3c4153 --- roles/custom/matrix-synapse/defaults/main.yml | 11 ++++++++++- .../templates/synapse/homeserver.yaml.j2 | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/roles/custom/matrix-synapse/defaults/main.yml b/roles/custom/matrix-synapse/defaults/main.yml index 0aa9d5f4b..23c08241c 100644 --- a/roles/custom/matrix-synapse/defaults/main.yml +++ b/roles/custom/matrix-synapse/defaults/main.yml @@ -468,6 +468,13 @@ matrix_synapse_rc_federation: matrix_synapse_federation_rr_transactions_per_room_per_second: 50 +# Controls the rate limit for delayed event management. +# +# This is only applied if `matrix_synapse_experimental_features_msc4140_enabled` is set to `true`. +matrix_synapse_rc_delayed_event_mgmt: + per_second: 1 + burst_count: 20 + # Controls the templates directory setting. # # See: @@ -1265,7 +1272,9 @@ matrix_synapse_experimental_features_msc3266_enabled: true # Delayed events are required for proper call (Element Call) participation signalling. # If disabled it is very likely that you end up with stuck calls in Matrix rooms. # -# Related to `matrix_synapse_max_event_delay_duration` +# Related to: +# - `matrix_synapse_max_event_delay_duration` +# - `matrix_synapse_rc_delayed_event_mgmt` # # See https://github.com/matrix-org/matrix-spec-proposals/pull/4140 matrix_synapse_experimental_features_msc4140_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 218be3b03..bd76b5e14 100644 --- a/roles/custom/matrix-synapse/templates/synapse/homeserver.yaml.j2 +++ b/roles/custom/matrix-synapse/templates/synapse/homeserver.yaml.j2 @@ -2999,6 +2999,7 @@ experimental_features: {% if matrix_synapse_experimental_features_msc4140_enabled %} max_event_delay_duration: {{ matrix_synapse_max_event_delay_duration | to_json }} +rc_delayed_event_mgmt: {{ matrix_synapse_rc_delayed_event_mgmt | to_json }} {% endif %} # vim:ft=yaml