From 483bdd8c0170da3be3d81f16791742d421ab6eaf Mon Sep 17 00:00:00 2001 From: Aaron Raimist Date: Tue, 11 Jun 2019 21:18:06 -0500 Subject: [PATCH 1/2] Allow default room version to be configured --- roles/matrix-synapse/defaults/main.yml | 2 ++ roles/matrix-synapse/templates/synapse/homeserver.yaml.j2 | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/matrix-synapse/defaults/main.yml b/roles/matrix-synapse/defaults/main.yml index ef585e37..50301d5b 100644 --- a/roles/matrix-synapse/defaults/main.yml +++ b/roles/matrix-synapse/defaults/main.yml @@ -286,3 +286,5 @@ matrix_synapse_room_list_publication_rules: alias: "*" room_id: "*" action: allow + +matrix_synapse_default_room_version: "4" diff --git a/roles/matrix-synapse/templates/synapse/homeserver.yaml.j2 b/roles/matrix-synapse/templates/synapse/homeserver.yaml.j2 index 6f3213be..869f313f 100644 --- a/roles/matrix-synapse/templates/synapse/homeserver.yaml.j2 +++ b/roles/matrix-synapse/templates/synapse/homeserver.yaml.j2 @@ -82,7 +82,7 @@ use_presence: {{ matrix_synapse_use_presence|to_json }} # For example, for room version 1, default_room_version should be set # to "1". # -#default_room_version: "4" +default_room_version: "{{ matrix_synapse_default_room_version|to_json }}" # The GC threshold parameters to pass to `gc.set_threshold`, if defined # From f4574961c7cd800d525043585c78ffa51782c33d Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Wed, 12 Jun 2019 09:17:35 +0300 Subject: [PATCH 2/2] Prevent double-quotes around default room version Using `|to_json` on a string is expected to correctly wrap it in quotes (e.g. `"4"`). Wrapping it explicitly in double-quotes results in undesirable double-quoting (`""4""`). --- roles/matrix-synapse/templates/synapse/homeserver.yaml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/matrix-synapse/templates/synapse/homeserver.yaml.j2 b/roles/matrix-synapse/templates/synapse/homeserver.yaml.j2 index 869f313f..43ae99b6 100644 --- a/roles/matrix-synapse/templates/synapse/homeserver.yaml.j2 +++ b/roles/matrix-synapse/templates/synapse/homeserver.yaml.j2 @@ -82,7 +82,7 @@ use_presence: {{ matrix_synapse_use_presence|to_json }} # For example, for room version 1, default_room_version should be set # to "1". # -default_room_version: "{{ matrix_synapse_default_room_version|to_json }}" +default_room_version: {{ matrix_synapse_default_room_version|to_json }} # The GC threshold parameters to pass to `gc.set_threshold`, if defined #