"Synapse module to automatically accept invites"
Project description
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 upgrade pip
first, e.g. by running
pip install --upgrade pip
)
Then alter your homeserver configuration, adding to your modules
configuration:
modules:
- module: synapse_auto_accept_invite.InviteAutoAccepter
config:
# Optional: if set to true, then only invites for direct messages (1:1 rooms)
# will be auto accepted. Otherwise, all room invites are accepted.
# Defaults to false.
accept_invites_only_for_direct_messages: 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 and mypy
type checker, use ./scripts-dev/lint.sh
.
Releasing
-
Set a shell variable to the version you are releasing (this just makes subsequent steps easier):
version=X.Y.Z
-
Update
setup.cfg
so that theversion
is correct. -
Stage the changed files and commit.
git add -u git commit -m v$version -n
-
Push your changes.
git push
-
When ready, create a signed tag for the release:
git tag -s v$version
Base the tag message on the changelog.
-
Push the tag.
git push origin tag v$version
-
Create a source distribution and upload it to PyPI:
python -m build twine upload dist/synapse_auto_accept_invite-$version*
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for synapse_auto_accept_invite-1.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 975adcfc79f05ce2837fb12ab66417425133fe17f8579ca2352b200bbbeface1 |
|
MD5 | 17899736e8aa1e848aff7ae666c80ca3 |
|
BLAKE2b-256 | 796d113e9824ac018c64cc13d40cd50d4e8e2da9fe1209a8460c6eed368d9847 |
Hashes for synapse_auto_accept_invite-1.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b20a78e97b1a86fa524574651e37b7d104200c2103417dca22443979d66bb75 |
|
MD5 | c2bd0ea86da92482e4a65e72896a49aa |
|
BLAKE2b-256 | ec1392540b398a048cd0ff0cccec15dcfd47b159e1a058edcbdcd68e85cc7e80 |