From 82de4581e32bf397d1d68effca6279f7c7529fa3 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Mon, 8 Jan 2024 17:06:38 +0200 Subject: [PATCH] Add support for disabling presence on matrix-bridge-mx-puppet-discord --- group_vars/matrix_servers | 2 ++ .../custom/matrix-bridge-mx-puppet-discord/defaults/main.yml | 3 +++ .../matrix-bridge-mx-puppet-discord/templates/config.yaml.j2 | 4 ++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/group_vars/matrix_servers b/group_vars/matrix_servers index 7adc85210..37dd57b56 100755 --- a/group_vars/matrix_servers +++ b/group_vars/matrix_servers @@ -1883,6 +1883,8 @@ matrix_mx_puppet_discord_homeserver_token: "{{ '%s' | format(matrix_homeserver_g matrix_mx_puppet_discord_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}" +matrix_mx_puppet_discord_presence_enabled: "{{ matrix_homeserver_implementation != 'synapse' or matrix_synapse_presence_enabled }}" + # Postgres is the default, except if not using internal Postgres server matrix_mx_puppet_discord_database_engine: "{{ 'postgres' if devture_postgres_enabled else 'sqlite' }}" matrix_mx_puppet_discord_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}" diff --git a/roles/custom/matrix-bridge-mx-puppet-discord/defaults/main.yml b/roles/custom/matrix-bridge-mx-puppet-discord/defaults/main.yml index 02db895ad..8419e1a7e 100644 --- a/roles/custom/matrix-bridge-mx-puppet-discord/defaults/main.yml +++ b/roles/custom/matrix-bridge-mx-puppet-discord/defaults/main.yml @@ -68,6 +68,9 @@ matrix_mx_puppet_discord_homeserver_token: '' # Can be set to enable automatic double-puppeting via Shared Secret Auth (https://github.com/devture/matrix-synapse-shared-secret-auth). matrix_mx_puppet_discord_login_shared_secret: '' +matrix_mx_puppet_discord_presence_enabled: true +matrix_mx_puppet_discord_presence_interval: 5000 + # Database configuration matrix_mx_puppet_discord_database_engine: 'sqlite' diff --git a/roles/custom/matrix-bridge-mx-puppet-discord/templates/config.yaml.j2 b/roles/custom/matrix-bridge-mx-puppet-discord/templates/config.yaml.j2 index a1c0cc486..dce3292ed 100644 --- a/roles/custom/matrix-bridge-mx-puppet-discord/templates/config.yaml.j2 +++ b/roles/custom/matrix-bridge-mx-puppet-discord/templates/config.yaml.j2 @@ -23,9 +23,9 @@ bridge: presence: # Bridge Discord online/offline status - enabled: true + enabled: {{ matrix_mx_puppet_discord_presence_enabled | to_json }} # How often to send status to the homeserver in milliseconds - interval: 5000 + interval: {{ matrix_mx_puppet_discord_presence_interval | to_json }} provisioning: # Regex of Matrix IDs allowed to use the puppet bridge