Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jan 10, 2025. It is now read-only.

Synapse module to automatically accept invites

License

NotificationsYou must be signed in to change notification settings

matrix-org/synapse-auto-accept-invite

For users of Element Synapse v1.109.0 or later, this functionality is now directly integrated into Synapse and does not need an external module.Seethe Synapse configuration manual for more information.

For users of earlier Synapse versions, this module should continue to work as-is.

Auto-accept invites

Synapse module to automatically accept invites.

Compatible with Synapse v1.84.0 and later.

Installation

From the virtual environment that you use for Synapse, install this module with:

pip install synapse-auto-accept-invite

(If you run into issues, you may need to upgradepip first, e.g. by runningpip install --upgrade pip)

Then alter your homeserver configuration, adding to yourmodules configuration:

modules:  -module:synapse_auto_accept_invite.InviteAutoAccepterconfig:# Optional: if set to true, then only invites for direct messages (1:1 rooms)# will be auto accepted.# Defaults to false.accept_invites_only_for_direct_messages:false# Optional: if set to true, then only invites from local users will be auto# accepted.# Defaults to false.accept_invites_only_from_local_users:false# (For workerised Synapse deployments)## This module should only be active on a single worker process at once,# otherwise invites may be accepted by multiple workers simultaneously.## By default, this module is only enabled on the main process, and is disabled# on workers. To choose a worker to run this module on (to reduce load on the# main process), specify that worker's configured 'worker_name' below.## Any worker may be specified. If this worker does not have the ability to# write to Synapse's events stream, it will end up calling out to one that# does.##worker_to_run_on: workername1

A note about logging

Your Synapse logging configuration should have the following option set in it:

disable_existing_loggers:False

Without it, logging from this module (and potentially others) may not appear in your logs.

Development

In a virtual environment with pip ≥ 21.1, run

pip install -e .[dev]

To run the unit tests, you can either use:

tox -e py

or

trial tests

To run the linters andmypy type checker, use./scripts-dev/lint.sh.

Releasing

  1. Set a shell variable to the version you are releasing (this just makessubsequent steps easier):

    version=X.Y.Z
  2. Updatesetup.cfg so that theversion is correct.

  3. Stage the changed files and commit.

    git add -ugit commit -m v$version -n
  4. Push your changes.

    git push
  5. When ready, create a signed tag for the release:

    git tag -s v$version

    Base the tag message on the changelog.

  6. Push the tag.

    git push origin tag v$version
  7. Create a source distribution and upload it to PyPI:

    python -m buildtwine upload dist/synapse_auto_accept_invite-$version*

About

Synapse module to automatically accept invites

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors7


[8]ページ先頭

©2009-2025 Movatter.jp