Move sliding sync url logic out of matrix-client.j2

This commit is contained in:
Samuel Meenzen 2023-08-11 08:13:49 +00:00
parent 9faa65f059
commit 837cca4ee1
3 changed files with 12 additions and 6 deletions

View file

@ -4018,6 +4018,8 @@ matrix_sliding_sync_environment_variable_syncv3_secret: "{{ '%s' | format(matrix
matrix_sliding_sync_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}" matrix_sliding_sync_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
matrix_sliding_sync_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'ss.db', rounds=655555) | to_uuid }}" matrix_sliding_sync_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'ss.db', rounds=655555) | to_uuid }}"
matrix_homeserver_sliding_sync_url: "{{ matrix_sliding_sync_base_url if matrix_sliding_sync_enabled else matrix_homeserver_sliding_sync_url }}"
###################################################################### ######################################################################
# #
# /matrix-sliding-sync # /matrix-sliding-sync
@ -4107,6 +4109,8 @@ matrix_conduit_systemd_required_services_list: |
(['docker.service']) (['docker.service'])
}} }}
# Starting from version `0.6.0` conduit natively supports some sync v3 (sliding-sync) features.
matrix_homeserver_sliding_sync_url: "{{ matrix_homeserver_url if matrix_conduit_enabled and not matrix_sliding_sync_enabled else matrix_homeserver_sliding_sync_url }}"
###################################################################### ######################################################################
# #

View file

@ -150,6 +150,12 @@ matrix_homeserver_container_url: ""
# This likely gets overriden elsewhere. # This likely gets overriden elsewhere.
matrix_homeserver_container_federation_url: "" matrix_homeserver_container_federation_url: ""
# Specifies the public url of the Sync v3 (sliding-sync) API.
# This will be used to set the `org.matrix.msc3575.proxy` property in `/.well-known/matrix/client`.
# Once the API is stabilized, this will no longer be required.
# See MSC3575: https://github.com/matrix-org/matrix-spec-proposals/blob/kegan/sync-v3/proposals/3575-sync.md
matrix_homeserver_sliding_sync_url: ""
matrix_identity_server_url: ~ matrix_identity_server_url: ~
matrix_integration_manager_rest_url: ~ matrix_integration_manager_rest_url: ~

View file

@ -26,13 +26,9 @@
"preferredDomain": {{ matrix_client_element_jitsi_preferred_domain|to_json }} "preferredDomain": {{ matrix_client_element_jitsi_preferred_domain|to_json }}
} }
{% endif %} {% endif %}
{% if matrix_sliding_sync_enabled %}, {% if matrix_homeserver_sliding_sync_url %},
"org.matrix.msc3575.proxy": { "org.matrix.msc3575.proxy": {
"url": "{{ matrix_sliding_sync_base_url }}" "url": "{{ matrix_homeserver_sliding_sync_url }}"
}
{% elif matrix_homeserver_implementation == 'conduit' %},
"org.matrix.msc3575.proxy": {
"url": "{{ matrix_homeserver_url }}"
} }
{% endif %} {% endif %}
{% if matrix_client_element_location_sharing_enabled %}, {% if matrix_client_element_location_sharing_enabled %},