A Synapse module that uses Sydent's internal bind APIs to automatically record 3PIDs association on an IS upon registration.
  • Python 95.9%
  • Shell 4.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2023-03-23 17:47:50 +00:00
.github Generation, minus module code 2022-03-21 16:56:18 +00:00
scripts-dev Generation, minus module code 2022-03-21 16:56:18 +00:00
synapse_bind_sydent Add support for unbinding third-party IDs when they are removed from the user account (#3) 2023-03-15 15:49:54 +00:00
tests Add support for unbinding third-party IDs when they are removed from the user account (#3) 2023-03-15 15:49:54 +00:00
.gitignore Add support for unbinding third-party IDs when they are removed from the user account (#3) 2023-03-15 15:49:54 +00:00
.gitlab-ci.yml Generation, minus module code 2022-03-21 16:56:18 +00:00
LICENSE Generation, minus module code 2022-03-21 16:56:18 +00:00
mypy.ini Generation, minus module code 2022-03-21 16:56:18 +00:00
pyproject.toml Generation, minus module code 2022-03-21 16:56:18 +00:00
README.md Add GitHub release creation instructions to the README (#7) 2023-03-23 17:47:50 +00:00
setup.cfg v1.1.0 2023-03-15 16:03:02 +00:00
tox.ini Generation, minus module code 2022-03-21 16:56:18 +00:00

Bind 3PIDs to Sydent

A module that leverages Sydent's internal bind APIs to automatically record 3PIDs association on a Sydent instance once it's been verified on the local Synapse homeserver.

This module works with Synapse v1.79.0 and above.

Installation

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

pip install path/to/synapse-bind-sydent

(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_bind_sydent.SydentBinder
    config:
      # The base URL (protocol + hostname or address) of the Sydent instance to bind to.
      # Must be reachable by Synapse.
      # Required.
      sydent_base_url: https://example.com

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

The exact steps for releasing will vary; but this is an approach taken by the Synapse developers (assuming a Unix-like shell):

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

    version=X.Y.Z
    
  2. Update setup.cfg so that the version is correct.

  3. Stage the changed files and commit.

    git add -u
    git 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 GitHub release, based on the tag you just pushed.