8 Commits

Author SHA1 Message Date
Slavi Pantaleev
61c3fbe1d5 Remove trailing spaces 2024-02-21 18:03:00 +02:00
Slavi Pantaleev
5f5ffff208 Add missing document start YAML annotation 2024-02-21 18:01:00 +02:00
Slavi Pantaleev
da028abc36 Fix logger name for synapse_auto_accept_invite
The name of the logger needs to match the name of the Python module.

Ref: d673c67678/synapse_auto_accept_invite/__init__.py (L20)
2024-02-21 18:00:37 +02:00
Slavi Pantaleev
97d3e5bb24 Fix alignment 2024-02-21 17:58:06 +02:00
Slavi Pantaleev
08cc646933 Add newline at end of file 2024-02-21 17:57:28 +02:00
Slavi Pantaleev
13e9a7e435 Fix typo and add details about synapse-auto-acccept-invite 2024-02-21 17:56:49 +02:00
xvsun
63babba31c feat: add logger, add synapse workers config 2024-02-21 15:04:46 +01:00
xvsun
2bacd698a3 changed: only_direct_messages variable naming 2024-02-21 11:52:28 +01:00
4 changed files with 30 additions and 8 deletions

View File

@@ -10,5 +10,15 @@ If you decide that you'd like to let this playbook install it for you, you need
```yaml
matrix_synapse_ext_synapse_auto_accept_invite_enabled: true
matrix_synapse_ext_synapse_auto_accept_invite_only_direct_messages: true
```
matrix_synapse_ext_synapse_auto_accept_invite_accept_invites_only_direct_messages: true
```
## Synapse worker deployments
In a [workerized Synapse deployment](https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/c9a842147e09647c355799ca024d65a5de66b099/docs/configuring-playbook-synapse.md#load-balancing-with-workers) it is possible to run this module on a worker to reduce the load on the main process (Default is 'null'). For example add this to your configuration:
```yaml
matrix_synapse_ext_synapse_auto_accept_invite_worker_to_run_on: 'matrix-synapse-worker-generic-0'
```
There might be an [issue with federation](https://github.com/matrix-org/synapse-auto-accept-invite/issues/18).

View File

@@ -49,7 +49,7 @@ matrix_synapse_container_image_customizations_enabled: |-
matrix_synapse_container_image_customizations_s3_storage_provider_installation_enabled: "{{ matrix_synapse_ext_synapse_s3_storage_provider_enabled }}"
# Controls whether custom build steps will be added to the Dockerfile for installing auto-accept-invite module.
# The version that will be installed is specified in `matrix_synapse_ext_synapse_auto_accept_invite_version`.
# The version that will be installed is specified in `matrix_synapse_ext_synapse_auto_accept_invite_version`.
matrix_synapse_container_image_customizations_auto_accept_invite_installation_enabled: "{{ matrix_synapse_ext_synapse_auto_accept_invite_enabled }}"
# Controls whether custom build steps will be added to the Dockerfile for customizing the email templates used by Synapse.
@@ -1219,13 +1219,15 @@ matrix_synapse_ext_synapse_s3_storage_provider_update_db_day_count: 0
matrix_synapse_ext_synapse_s3_storage_provider_periodic_migration_schedule: '*-*-* 05:00:00'
# Synapse module to automatically accept room invites.
# See: https://github.com/matrix-org/synapse-auto-accept-invite
# Installing it requires building a customized Docker image for Synapse (see `matrix_synapse_container_image_customizations_enabled`).
# Enabling this will enable customizations and inject the appropriate Dockerfile clauses for installing synapse-auto-accept-invite.
matrix_synapse_ext_synapse_auto_accept_invite_enabled: false
matrix_synapse_ext_synapse_auto_accept_invite_version: 1.1.3
# Specifies whether only direct messages (1:1 rooms) will be auto accepted.
matrix_synapse_ext_synapse_auto_accept_invite_only_direct_messages: false
matrix_synapse_ext_synapse_auto_accept_invite_accept_invites_only_direct_messages: false
# When Synapse workers enabled it is possible (but not required) to assign a worker to run this module on (null = main process).
matrix_synapse_ext_synapse_auto_accept_invite_worker_to_run_on: null
# Specifies whether an external media repository is enabled.
# If it is, the Synapse media repo and media-repo workers will be disabled automatically.

View File

@@ -81,4 +81,4 @@
- install-synapse
block:
- when: matrix_synapse_ext_synapse_auto_accept_invite_enabled | bool
ansible.builtin.include_tasks: "{{ role_path }}/tasks/ext/synapse-auto-accept-invite/setup_install.yml"
ansible.builtin.include_tasks: "{{ role_path }}/tasks/ext/synapse-auto-accept-invite/setup_install.yml"

View File

@@ -1,3 +1,5 @@
---
- ansible.builtin.set_fact:
matrix_synapse_modules: |
{{
@@ -7,7 +9,15 @@
{
"module": "synapse_auto_accept_invite.InviteAutoAccepter",
"config": {
"accept_invites_only_for_direct_messages": matrix_synapse_ext_synapse_auto_accept_invite_only_direct_messages
}
"accept_invites_only_for_direct_messages": matrix_synapse_ext_synapse_auto_accept_invite_accept_invites_only_direct_messages,
"worker_to_run_on": matrix_synapse_ext_synapse_auto_accept_invite_worker_to_run_on,
},
}]
}}
matrix_synapse_additional_loggers_auto: >
{{
matrix_synapse_additional_loggers_auto
+
[{'name': 'synapse_auto_accept_invite', 'level': 'INFO'}]
}}