Просмотр исходного кода

Add matrix_rtc.transports support for Synapse (MSC4143)

Enabling the MSC4143 experimental feature without configuring any transports makes Synapse serve an empty response on the RTC transports API. Clients treat that response as authoritative and do not fall back to the org.matrix.msc4143.rtc_foci property in the client well-known, breaking Element Call with a MISSING_MATRIX_RTC_TRANSPORT error.

This makes the playbook wire the LiveKit JWT service URL into the new matrix_rtc.transports Synapse setting, matching what continuwuity, tuwunel and the client well-known already advertise.

Fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/5522

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
pull/5524/head
Slavi Pantaleev 16 часов назад
Родитель
Сommit
4d98ca54a6
3 измененных файлов: 37 добавлений и 0 удалений
  1. +2
    -0
      group_vars/matrix_servers
  2. +32
    -0
      roles/custom/matrix-synapse/defaults/main.yml
  3. +3
    -0
      roles/custom/matrix-synapse/templates/synapse/homeserver.yaml.j2

+ 2
- 0
group_vars/matrix_servers Просмотреть файл

@@ -5191,6 +5191,8 @@ matrix_synapse_delayed_events_enabled: "{{ matrix_rtc_enabled }}"

matrix_synapse_experimental_features_msc4143_enabled: "{{ matrix_rtc_enabled }}"

matrix_synapse_matrix_rtc_transports_livekit_url: "{{ matrix_livekit_jwt_service_public_url if matrix_livekit_jwt_service_enabled else '' }}"

matrix_synapse_experimental_features_msc4222_enabled: "{{ matrix_rtc_enabled }}"

matrix_synapse_experimental_features_msc4354_enabled: "{{ matrix_rtc_enabled }}"


+ 32
- 0
roles/custom/matrix-synapse/defaults/main.yml Просмотреть файл

@@ -1459,9 +1459,41 @@ matrix_synapse_max_event_delay_duration: 24h
#
# This is used by MatrixRTC clients to discover the unstable RTC transports API.
#
# When enabling this, make sure that `matrix_synapse_matrix_rtc_transports` is not empty.
# Serving the RTC transports API without any transports configured breaks MatrixRTC (Element Call) for clients which consult this API.
# Such clients treat the API response as authoritative and do not fall back to the `org.matrix.msc4143.rtc_foci` property in the client well-known.
#
# See https://github.com/matrix-org/matrix-spec-proposals/pull/4143
matrix_synapse_experimental_features_msc4143_enabled: false

# Controls the `matrix_rtc.transports` setting - the list of MatrixRTC transports advertised via the RTC transports API (MSC4143).
#
# The API serving this list is only enabled when `matrix_synapse_experimental_features_msc4143_enabled` is set to `true`.
# Otherwise, this setting is parsed by Synapse, but remains unused.
matrix_synapse_matrix_rtc_transports: "{{ matrix_synapse_matrix_rtc_transports_default + matrix_synapse_matrix_rtc_transports_auto + matrix_synapse_matrix_rtc_transports_custom }}"

# Holds the default MatrixRTC transports list, driven by `matrix_synapse_matrix_rtc_transports_livekit_url`.
matrix_synapse_matrix_rtc_transports_default: |-
{{
(
[{'type': 'livekit', 'livekit_service_url': matrix_synapse_matrix_rtc_transports_livekit_url}] if matrix_synapse_matrix_rtc_transports_livekit_url != '' else []
)
}}

# Holds MatrixRTC transports entries that a playbook may inject automatically, based on the state of other services.
#
# This variable is not meant to be redefined by users.
# To inject your own entries, use `matrix_synapse_matrix_rtc_transports_custom`.
matrix_synapse_matrix_rtc_transports_auto: []

# Holds additional MatrixRTC transports entries that you may wish to inject.
matrix_synapse_matrix_rtc_transports_custom: []

# Controls the MatrixRTC LiveKit URL auto-added to `matrix_synapse_matrix_rtc_transports`.
#
# This is set automatically if you are using the playbook's MatrixRTC stack.
matrix_synapse_matrix_rtc_transports_livekit_url: ''

# 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.


+ 3
- 0
roles/custom/matrix-synapse/templates/synapse/homeserver.yaml.j2 Просмотреть файл

@@ -3010,4 +3010,7 @@ 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 %}

matrix_rtc:
transports: {{ matrix_synapse_matrix_rtc_transports | to_json }}

# vim:ft=yaml

Загрузка…
Отмена
Сохранить