"Synapse module to automatically accept invites"
Project description
Auto-accept invites
Synapse module to automatically accept invites.
Compatible with Synapse v1.57.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)
# If you want to accept invites on a specific worker, specify its instance
# name here. Otherwise, invites will be processed on the main process.
#
# Any worker can be used.
#
#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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45ef7155070695382f56294e01999dc4e201d6281865290bc62ae3460d134fde |
|
MD5 | 70ad6497c1bf6928b3dbbaec4c2beaab |
|
BLAKE2b-256 | c78b42225c3fdf28d922b3c6fa7ca504e9e7b1b65cac6c002fc9e1853c166aa7 |
Hashes for synapse_auto_accept_invite-1.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 273e2085bb9dd83fa12a9a10f8977d180f8c553256dbdee683b19e99b4e86fe5 |
|
MD5 | 3e1c01954485d71c91e60f361f50ff48 |
|
BLAKE2b-256 | c5e05a590f5820c47990e00b99b397f2a83dffeede255b25ceaad4383b60b505 |