Explorar el Código

fix: conditionally include m.identity_server in Element Web config.json

When no identity server is configured, `matrix_client_element_default_is_url`
defaults to `~` (YAML null). The `| string | to_json` filter chain converts
this to the literal string `"None"`, causing Element Web to log errors:

- TypeError: URL constructor: None is not a valid URL
- Invalid base_url for m.identity_server

The well-known template (`.well-known/matrix/client.j2`) already handles
this correctly with a conditional guard (see PR #314). This applies the
same pattern to the Element Web `config.json.j2` template.
pull/4999/head
tripleawwy hace 1 día
committed by Slavi Pantaleev
padre
commit
58bf4fe34b
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. +3
    -1
      roles/custom/matrix-client-element/templates/config.json.j2

+ 3
- 1
roles/custom/matrix-client-element/templates/config.json.j2 Ver fichero

@@ -3,10 +3,12 @@
"m.homeserver": {
"base_url": {{ matrix_client_element_default_hs_url | string | to_json }},
"server_name": {{ matrix_client_element_default_server_name | string | to_json }}
},
}
{% if matrix_client_element_default_is_url %},
"m.identity_server": {
"base_url": {{ matrix_client_element_default_is_url | string | to_json }}
}
{% endif %}
},
"setting_defaults": {
"custom_themes": {{ matrix_client_element_setting_defaults_custom_themes | to_json }}


Cargando…
Cancelar
Guardar