Fix YAML serialization of empty matrix_synapse_federation_domain_whitelist
We've previously changed a bunch of lists in `homeserver.yaml.j2` to be serialized using `|to_nice_yaml`, as that generates a more readable list in YAML. `matrix_synapse_federation_domain_whitelist`, however, couldn't have been changed to that, as it can potentially be an empty list. We may be able to differentiate between empty and non-empty now and serialize it accordingly (favoring `|to_nice_yaml` if non-empty), but it's not important enough to be justified. Thus, always serializing with `|to_json`. Fixes #78 (Github issue)
This commit is contained in:
parent
2d711555fe
commit
294a5c9083
@ -120,8 +120,8 @@ use_presence: {{ matrix_synapse_use_presence|to_json }}
|
|||||||
# - nyc.example.com
|
# - nyc.example.com
|
||||||
# - syd.example.com
|
# - syd.example.com
|
||||||
{% if matrix_synapse_federation_domain_whitelist is not none %}
|
{% if matrix_synapse_federation_domain_whitelist is not none %}
|
||||||
federation_domain_whitelist:
|
{# Cannot use `|to_nice_yaml` here, as an empty list does not get serialized properly by it. #}
|
||||||
{{ matrix_synapse_federation_domain_whitelist|to_nice_yaml }}
|
federation_domain_whitelist: {{ matrix_synapse_federation_domain_whitelist|to_json }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
# List of ports that Synapse should listen on, their purpose and their
|
# List of ports that Synapse should listen on, their purpose and their
|
||||||
|
Loading…
Reference in New Issue
Block a user