From 4b1e9a4827f526ccb247be04dd59456f64757d47 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Mon, 9 Sep 2019 08:11:32 +0300 Subject: [PATCH] Add support for configuring Synapse spam_checker setting --- roles/matrix-synapse/defaults/main.yml | 6 ++++++ roles/matrix-synapse/templates/synapse/homeserver.yaml.j2 | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/roles/matrix-synapse/defaults/main.yml b/roles/matrix-synapse/defaults/main.yml index bf4a4359c..fbf39778d 100644 --- a/roles/matrix-synapse/defaults/main.yml +++ b/roles/matrix-synapse/defaults/main.yml @@ -296,6 +296,12 @@ matrix_synapse_room_list_publication_rules: matrix_synapse_default_room_version: "4" +# Controls the Synapse `spam_checker` setting. +# +# If a spam-checker extension is enabled, this variable's value is set automatically by the playbook during runtime. +# If not, you can also control its value manually. +matrix_synapse_spam_checker: ~ + # Default Synapse configuration template which covers the generic use case. # You can customize it by controlling the various variables inside it. # diff --git a/roles/matrix-synapse/templates/synapse/homeserver.yaml.j2 b/roles/matrix-synapse/templates/synapse/homeserver.yaml.j2 index 220e62cd1..91f371a27 100644 --- a/roles/matrix-synapse/templates/synapse/homeserver.yaml.j2 +++ b/roles/matrix-synapse/templates/synapse/homeserver.yaml.j2 @@ -1319,7 +1319,7 @@ push: # module: "my_custom_project.SuperSpamChecker" # config: # example_option: 'things' - +spam_checker: {{ matrix_synapse_spam_checker|to_json }} # Uncomment to allow non-server-admin users to create groups on this server #