diff --git a/charts/matrix-stack/templates/well-known/_helpers.tpl b/charts/matrix-stack/templates/well-known/_helpers.tpl index 923d2b6b..abbedb5d 100644 --- a/charts/matrix-stack/templates/well-known/_helpers.tpl +++ b/charts/matrix-stack/templates/well-known/_helpers.tpl @@ -47,6 +47,7 @@ k8s.element.io/target-instance: {{ $root.Release.Name }}-haproxy {{- $_ := set $config "org.matrix.msc2965.authentication" $msc2965 -}} {{- end -}} {{- end -}} +{{- $_ := set $config "org.matrix.msc4143.rtc_foci" (list (dict "type" "livekit" "livekit_service_url" "https://livekit-jwt.call.element.io")) -}} {{- $additional := .additional.client | fromJson -}} {{- tpl (toPrettyJson (merge $config $additional)) $root -}} {{- end -}} diff --git a/newsfragments/306.added.md b/newsfragments/306.added.md new file mode 100644 index 00000000..be2333f5 --- /dev/null +++ b/newsfragments/306.added.md @@ -0,0 +1 @@ +Configure well-known to use Element LiveKit by default. diff --git a/tests/integration/test_well_known_delegation.py b/tests/integration/test_well_known_delegation.py index a7cf26bc..be358947 100644 --- a/tests/integration/test_well_known_delegation.py +++ b/tests/integration/test_well_known_delegation.py @@ -22,7 +22,11 @@ async def test_well_known_files_can_be_accessed( if value_file_has("synapse.enabled", True): assert "m.homeserver" in json_content else: - assert json_content == {} + assert json_content == { + "org.matrix.msc4143.rtc_foci": [ + {"type": "livekit", "livekit_service_url": "https://livekit-jwt.call.element.io"} + ] + } json_content = await aiottp_get_json(f"https://{generated_data.server_name}/.well-known/matrix/server", ssl_context) if value_file_has("synapse.enabled", True): diff --git a/tests/manifests/test_well_known_delegation.py b/tests/manifests/test_well_known_delegation.py index c2f9d913..a3e5734e 100644 --- a/tests/manifests/test_well_known_delegation.py +++ b/tests/manifests/test_well_known_delegation.py @@ -30,6 +30,11 @@ async def assert_well_known_files( expected_server = {} if expected_client is None: expected_client = {} + expected_client = expected_client | { + "org.matrix.msc4143.rtc_foci": [ + {"type": "livekit", "livekit_service_url": "https://livekit-jwt.call.element.io"} + ] + } client_config = {"testclientkey": {"testsubket": "testvalue"}} server_config = {"testserverkey": {"testsubket": "testvalue"}} element_config = {"testelementkey": {"testsubket": "testvalue"}}