From e5b48f22db14e9b6e4060d18ae222001373acc5e Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Tue, 17 Feb 2026 12:37:46 +0000 Subject: [PATCH] Remove synapse-auto-invite-accept (#4943) * Remove `matrix_synapse_ext_synapse_auto_accept_invite_worker_to_run_on` Signed-off-by: Suguru Hirahara * Remove `matrix_synapse_ext_synapse_auto_accept_invite_accept_invites_only_direct_messages` Signed-off-by: Suguru Hirahara * Remove `matrix_synapse_ext_synapse_auto_accept_invite_enabled` Signed-off-by: Suguru Hirahara * Remove `matrix_synapse_container_image_customizations_auto_accept_invite_installation_enabled` Signed-off-by: Suguru Hirahara * Remove `matrix_synapse_ext_synapse_auto_accept_invite_version` Signed-off-by: Suguru Hirahara * Remove `matrix_synapse_ext_synapse_auto_accept_invite_accept_invites_only_from_local_users` Signed-off-by: Suguru Hirahara * Remove roles/custom/matrix-synapse/tasks/ext/synapse-auto-accept-invite Signed-off-by: Suguru Hirahara * Update README.md Signed-off-by: Suguru Hirahara * Update container-images.md Signed-off-by: Suguru Hirahara * Update configuring-playbook.md Signed-off-by: Suguru Hirahara * Update configuring-playbook-synapse-auto-accept-invite.md Reuse https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/bf744319e0fd3ab889070ab327ab3324824647fc/docs/configuring-playbook-sliding-sync-proxy.md Signed-off-by: Suguru Hirahara * Update validate_config.yml Signed-off-by: Suguru Hirahara * Update CHANGELOG.md Signed-off-by: Suguru Hirahara --------- Signed-off-by: Suguru Hirahara Co-authored-by: Suguru Hirahara --- CHANGELOG.md | 8 ++++ README.md | 1 - ...ing-playbook-synapse-auto-accept-invite.md | 47 ++++++------------- docs/configuring-playbook.md | 4 +- docs/container-images.md | 2 +- roles/custom/matrix-synapse/defaults/main.yml | 24 ---------- .../tasks/ext/setup_install.yml | 10 ---- .../setup_install.yml | 28 ----------- .../matrix-synapse/tasks/validate_config.yml | 12 ----- .../synapse/customizations/Dockerfile.j2 | 4 -- .../tasks/validate_config.yml | 12 +++++ 11 files changed, 37 insertions(+), 115 deletions(-) delete mode 100644 roles/custom/matrix-synapse/tasks/ext/synapse-auto-accept-invite/setup_install.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 541f01a73..d1946359d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,14 @@ Along with the relocation, the `matrix_prometheus_nginxlog_exporter_` prefix on As always, the playbook would let you know about this and point out any variables you may have missed. +## synapse-auto-invite-accept has been removed from the playbook + +[synapse-auto-invite-accept](./docs/configuring-playbook-synapse-auto-accept-invite.md) has been removed from the playbook, as the same functionality [has been integrated](https://github.com/element-hq/synapse/pull/17147) to Synapse since [v1.109.0](https://github.com/element-hq/synapse/releases/tag/v1.109.0). + +See [this section](./docs/configuring-playbook-synapse-auto-accept-invite.md#native-alternative) for details about how to enable the function on Synapse. + +If you're using any `matrix_synapse_ext_synapse_auto_accept_invite_*` variables, the playbook will let you know which one you'll need to remove from `vars.yml`. + # 2026-02-16 ## matrix-appservice-slack has been removed from the playbook diff --git a/README.md b/README.md index f7006a791..7fb937636 100644 --- a/README.md +++ b/README.md @@ -171,7 +171,6 @@ Various services that don't fit any other categories. | Name | Default? | Description | Documentation | | ---- | -------- | ----------- | ------------- | -| [synapse_auto_accept_invite](https://github.com/matrix-org/synapse-auto-accept-invite) | ❌ | Synapse module to automatically accept invites | [Link](docs/configuring-playbook-synapse-auto-accept-invite.md) | | [synapse_auto_compressor](https://github.com/matrix-org/rust-synapse-compress-state/#automated-tool-synapse_auto_compressor) | ❌ | Cli tool that automatically compresses `state_groups` database table in background | [Link](docs/configuring-playbook-synapse-auto-compressor.md) | | [Matrix Corporal](https://github.com/devture/matrix-corporal) (advanced) | ❌ | Reconciliator and gateway for a managed Matrix server | [Link](docs/configuring-playbook-matrix-corporal.md) | | [Matrix.to](https://github.com/matrix-org/matrix.to) | ❌ | Simple URL redirection service for the Matrix ecosystem | [Link](docs/configuring-playbook-matrixto.md) | diff --git a/docs/configuring-playbook-synapse-auto-accept-invite.md b/docs/configuring-playbook-synapse-auto-accept-invite.md index f6f80120a..0ccecdebb 100644 --- a/docs/configuring-playbook-synapse-auto-accept-invite.md +++ b/docs/configuring-playbook-synapse-auto-accept-invite.md @@ -1,45 +1,26 @@ -# Setting up Synapse Auto Invite Accept (optional) +# Setting up Synapse Auto Invite Accept (optional, removed) -The playbook can install and configure [synapse-auto-invite-accept](https://github.com/matrix-org/synapse-auto-accept-invite) for you. - -In short, it automatically accepts room invites. You can specify that only 1:1 room invites are auto-accepted. Defaults to false if not specified. - -See the project's [documentation](https://github.com/matrix-org/synapse-auto-accept-invite/blob/main/README.md) to learn what it does and why it might be useful to you. - -**Note**: Synapse [v1.109.0](https://github.com/element-hq/synapse/releases/tag/v1.109.0), the same feature [has been merged](https://github.com/element-hq/synapse/pull/17147) into Synapse (see the [Native alternative](#native-alternative) section below). You'd better use the native feature, instead of the [synapse-auto-invite-accept](https://github.com/matrix-org/synapse-auto-accept-invite) 3rd party module. - -## Adjusting the playbook configuration - -If you decide that you'd like to let this playbook install the [synapse-auto-invite-accept](https://github.com/matrix-org/synapse-auto-accept-invite module for you, add the following configuration to your `inventory/host_vars/matrix.example.com/vars.yml` file: - -```yaml -matrix_synapse_ext_synapse_auto_accept_invite_enabled: 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). +ðŸŠĶ The playbook used to be able to install and configure [synapse-auto-invite-accept](https://github.com/matrix-org/synapse-auto-accept-invite), but no longer includes this component, as the same functionality [has been integrated](https://github.com/element-hq/synapse/pull/17147) to Synapse since [v1.109.0](https://github.com/element-hq/synapse/releases/tag/v1.109.0). ## Native alternative -Since Synapse [v1.109.0](https://github.com/element-hq/synapse/releases/tag/v1.109.0), the functionality provided by the [synapse-auto-invite-accept](https://github.com/matrix-org/synapse-auto-accept-invite) 3rd party module [has been made](https://github.com/element-hq/synapse/pull/17147) part of Synapse. - Here's example configuration for using the **native** Synapse feature: ```yaml diff --git a/docs/configuring-playbook.md b/docs/configuring-playbook.md index 7abe3c106..391ca7f02 100644 --- a/docs/configuring-playbook.md +++ b/docs/configuring-playbook.md @@ -233,8 +233,6 @@ Various services that don't fit any other categories. - [Setting up Matrix RTC](configuring-playbook-matrix-rtc.md) (optional) -- [Setting up Synapse Auto Invite Accept](configuring-playbook-synapse-auto-accept-invite.md) - - [Setting up synapse-auto-compressor](configuring-playbook-synapse-auto-compressor.md) for compressing the database on Synapse homeservers - [Setting up Matrix Corporal](configuring-playbook-matrix-corporal.md) (advanced) @@ -290,3 +288,5 @@ Various services that don't fit any other categories. - [Setting up MX Puppet Slack bridging](configuring-playbook-bridge-mx-puppet-slack.md) (removed; this component has been unmaintained for a long time, so it has been removed from the playbook. Consider [setting up Mautrix Slack bridging](configuring-playbook-bridge-mautrix-slack.md)) - [Setting up MX Puppet Twitter bridging](configuring-playbook-bridge-mx-puppet-twitter.md) (removed; this component has been unmaintained for a long time, so it has been removed from the playbook. Consider [setting up Mautrix Twitter bridging](configuring-playbook-bridge-mautrix-twitter.md)) + +- [Setting up Synapse Auto Invite Accept](configuring-playbook-synapse-auto-accept-invite.md) (removed; since Synapse [v1.109.0](https://github.com/element-hq/synapse/releases/tag/v1.109.0) the same feature is available natively.) diff --git a/docs/container-images.md b/docs/container-images.md index 3014218eb..97d47585d 100644 --- a/docs/container-images.md +++ b/docs/container-images.md @@ -149,7 +149,6 @@ Various services that don't fit any other categories. | Service | Container image | Default? | Description | | ------- | --------------- | -------- | ----------- | -| [synapse_auto_accept_invite](configuring-playbook-synapse-auto-accept-invite.md) | (N/A) | ❌ | Synapse module to automatically accept invites | | [synapse_auto_compressor](configuring-playbook-synapse-auto-compressor.md) | [mb-saces/rust-synapse-tools](https://gitlab.com/mb-saces/rust-synapse-tools/container_registry) | ❌ | Cli tool that automatically compresses Synapse's `state_groups` database table in background | | [Matrix Corporal](configuring-playbook-matrix-corporal.md) (advanced) | [devture/matrix-corporal](https://hub.docker.com/r/devture/matrix-corporal/) | ❌ | Reconciliator and gateway for a managed Matrix server | | [Etherpad](configuring-playbook-etherpad.md) | [etherpad/etherpad](https://hub.docker.com/r/etherpad/etherpad/) | ❌ | Open source collaborative text editor | @@ -185,3 +184,4 @@ The list of the deprecated or unmaintained services is available [here](configur | [mx-puppet-slack](configuring-playbook-bridge-mx-puppet-slack.md) | [mx-puppet/slack/mx-puppet-slack](https://gitlab.com/mx-puppet/slack/mx-puppet-slack/container_registry) | ❌ | Bridge to [Slack](https://slack.com) | | [mx-puppet-twitter](configuring-playbook-bridge-mx-puppet-twitter.md) | [sorunome/mx-puppet-twitter](https://hub.docker.com/r/sorunome/mx-puppet-twitter) | ❌ | Bridge for Twitter-DMs ([Twitter](https://twitter.com/)) | | [sliding-sync](configuring-playbook-sliding-sync-proxy.md) | [matrix-org/sliding-sync](https://ghcr.io/matrix-org/sliding-sync) | ❌ | Sliding Sync support for clients which require it (like old Element X versions, before it got switched to Simplified Sliding Sync) | +| [synapse_auto_accept_invite](configuring-playbook-synapse-auto-accept-invite.md) | (N/A) | ❌ | Synapse module to automatically accept invites | diff --git a/roles/custom/matrix-synapse/defaults/main.yml b/roles/custom/matrix-synapse/defaults/main.yml index 71bf266ef..ef530e529 100644 --- a/roles/custom/matrix-synapse/defaults/main.yml +++ b/roles/custom/matrix-synapse/defaults/main.yml @@ -40,18 +40,12 @@ matrix_synapse_container_image_customizations_enabled: |- matrix_synapse_container_image_customizations_s3_storage_provider_installation_enabled or matrix_synapse_container_image_customizations_templates_enabled - or - matrix_synapse_container_image_customizations_auto_accept_invite_installation_enabled }} # Controls whether custom build steps will be added to the Dockerfile for installing s3-storage-provider. # The version that will be installed is specified in `matrix_synapse_ext_synapse_s3_storage_provider_version`. 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`. -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. # # Example usage: @@ -665,7 +659,6 @@ matrix_synapse_auto_join_mxid_localpart: '' # Controls whether room invites will be accepted on behalf of users. # See: https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html#auto-accept-invites -# This should not be used together with the `synapse_auto_accept_invite` module (see `matrix_synapse_ext_synapse_auto_accept_invite_enabled`). # Also see: # - `matrix_synapse_auto_accept_invites_only_for_direct_messages` # - `matrix_synapse_auto_accept_invites_only_from_local_users` @@ -1550,23 +1543,6 @@ matrix_synapse_ext_synapse_s3_storage_provider_migrate_systemd_required_services # List of systemd services that matrix-synapse-s3-storage-provider-migrate.service wants matrix_synapse_ext_synapse_s3_storage_provider_migrate_systemd_wanted_services_list: [] -# Synapse module to automatically accept room invites. -# -# Since Synapse v1.109.0 (https://github.com/element-hq/synapse/pull/17147), -# this functionality has been merged into Synapse. See `matrix_synapse_auto_accept_invites_enabled`. -# -# 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_accept_invites_only_direct_messages: false -# Specifies whether only invites from local users will be auto accepted. -matrix_synapse_ext_synapse_auto_accept_invite_accept_invites_only_from_local_users: 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. matrix_synapse_ext_media_repo_enabled: false diff --git a/roles/custom/matrix-synapse/tasks/ext/setup_install.yml b/roles/custom/matrix-synapse/tasks/ext/setup_install.yml index b5f9c6227..8ddd59fd4 100644 --- a/roles/custom/matrix-synapse/tasks/ext/setup_install.yml +++ b/roles/custom/matrix-synapse/tasks/ext/setup_install.yml @@ -91,13 +91,3 @@ - when: matrix_synapse_ext_synapse_s3_storage_provider_enabled | bool ansible.builtin.include_tasks: "{{ role_path }}/tasks/ext/s3-storage-provider/setup_install.yml" - -# synapse-auto-accept-invite -- tags: - - setup-all - - setup-synapse - - install-all - - 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" diff --git a/roles/custom/matrix-synapse/tasks/ext/synapse-auto-accept-invite/setup_install.yml b/roles/custom/matrix-synapse/tasks/ext/synapse-auto-accept-invite/setup_install.yml deleted file mode 100644 index 9bbabdbaf..000000000 --- a/roles/custom/matrix-synapse/tasks/ext/synapse-auto-accept-invite/setup_install.yml +++ /dev/null @@ -1,28 +0,0 @@ -# SPDX-FileCopyrightText: 2024 MDAD project contributors -# -# SPDX-License-Identifier: AGPL-3.0-or-later - ---- - -- ansible.builtin.set_fact: - matrix_synapse_modules: | - {{ - matrix_synapse_modules | default([]) - + - [ - { - "module": "synapse_auto_accept_invite.InviteAutoAccepter", - "config": { - "accept_invites_only_for_direct_messages": matrix_synapse_ext_synapse_auto_accept_invite_accept_invites_only_direct_messages, - "accept_invites_only_from_local_users": matrix_synapse_ext_synapse_auto_accept_invite_accept_invites_only_from_local_users, - "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'}] - }} diff --git a/roles/custom/matrix-synapse/tasks/validate_config.yml b/roles/custom/matrix-synapse/tasks/validate_config.yml index 7e0595eff..024ed9b6a 100644 --- a/roles/custom/matrix-synapse/tasks/validate_config.yml +++ b/roles/custom/matrix-synapse/tasks/validate_config.yml @@ -151,18 +151,6 @@ with_items: - matrix_synapse_container_image_customizations_templates_git_repository_keyscan_hostname - -- name: Fail when auto-accept-invite enabled as a native feature and a module at the same time - ansible.builtin.fail: - msg: >- - Your configuration enables the auto-accept invites feature both as a native Synapse feature (`matrix_synapse_auto_accept_invites_enabled`) and a 3rd party module (`matrix_synapse_ext_synapse_auto_accept_invite_enabled`). - This is unnecessary, since they both do the same and the native feature is built on top of the 3rd party module anyway. - Enabling both at the same time will lead to issues. - We recommend leaving `matrix_synapse_auto_accept_invites_enabled` in your configuration and removing `matrix_synapse_ext_synapse_auto_accept_invite_enabled`. - when: - - matrix_synapse_auto_accept_invites_enabled - - matrix_synapse_ext_synapse_auto_accept_invite_enabled - - name: Fail if known Synapse password provider modules are enabled when auth is delegated to Matrix Authentication Service ansible.builtin.fail: msg: "When Synapse is delegating authentication to Matrix Authentication Service (`matrix_synapse_matrix_authentication_service_enabled: true`), it does not make sense to enable password provider modules, because it is not Synapse that is handling authentication. Please disable {{ item }} before enabling Matrix Authentication Service integration for Synapse. Synapse will refuse to start otherwise." diff --git a/roles/custom/matrix-synapse/templates/synapse/customizations/Dockerfile.j2 b/roles/custom/matrix-synapse/templates/synapse/customizations/Dockerfile.j2 index acdcb5752..628bbc92b 100644 --- a/roles/custom/matrix-synapse/templates/synapse/customizations/Dockerfile.j2 +++ b/roles/custom/matrix-synapse/templates/synapse/customizations/Dockerfile.j2 @@ -40,10 +40,6 @@ RUN chown -R {{ matrix_synapse_uid }}:{{ matrix_synapse_gid }} {{ matrix_synapse FROM {{ matrix_synapse_docker_image }} -{% if matrix_synapse_container_image_customizations_auto_accept_invite_installation_enabled %} -RUN pip install synapse-auto-accept-invite=={{ matrix_synapse_ext_synapse_auto_accept_invite_version }} -{% endif %} - {% if matrix_synapse_container_image_customizations_s3_storage_provider_installation_enabled %} RUN pip install synapse-s3-storage-provider=={{ matrix_synapse_ext_synapse_s3_storage_provider_version }} {% endif %} diff --git a/roles/custom/matrix_playbook_migration/tasks/validate_config.yml b/roles/custom/matrix_playbook_migration/tasks/validate_config.yml index dd1c4e8e2..97ed89e74 100644 --- a/roles/custom/matrix_playbook_migration/tasks/validate_config.yml +++ b/roles/custom/matrix_playbook_migration/tasks/validate_config.yml @@ -831,3 +831,15 @@ The following variables in your configuration need to be removed: {{ lookup('ansible.builtin.varnames', '^matrix_sliding_sync_.+', wantlist=True) | join(', ') }} when: "lookup('ansible.builtin.varnames', '^matrix_sliding_sync_.+', wantlist=True) | length > 0" + +- name: (Deprecation) Catch and report the synapse-auto-invite-accept variables + ansible.builtin.fail: + msg: |- + synapse-auto-invite-accept was completely removed from the playbook in February 2026, as the same functionality is available since Synapse v1.109.0. + + Please remove all `matrix_synapse_ext_synapse_auto_accept_invite_*` variables from your configuration file (vars.yml). + + To enable the native feature, see `docs/configuring-playbook-synapse-auto-accept-invite.md` for more information. + + The following variables in your configuration need to be removed: {{ lookup('ansible.builtin.varnames', '^matrix_synapse_ext_synapse_auto_accept_invite_.+', wantlist=True) | join(', ') }} + when: "lookup('ansible.builtin.varnames', '^matrix_synapse_ext_synapse_auto_accept_invite_.+', wantlist=True) | length > 0"