A custom Synapse module for DINUM which augments user directory search results
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Andrew Morgan 5faeedb533 archive repo
2021-03-08 00:09:34 +00:00
.github/workflows initial commit 2021-01-28 18:21:40 +00:00
matrix_synapse_user_directory_search_dinum Lint and update copyright header 2021-02-08 16:10:24 +00:00
tests Lint and update copyright header 2021-02-08 16:10:24 +00:00
.gitignore initial commit 2021-01-28 18:21:40 +00:00
LICENSE initial commit 2021-01-28 18:21:40 +00:00
README.md archive repo 2021-03-08 00:09:34 +00:00
setup.cfg initial commit 2021-01-28 18:21:40 +00:00
setup.py initial commit 2021-01-28 18:21:40 +00:00
tox.ini initial commit 2021-01-28 18:21:40 +00:00

Synapse User Directory Search Module for DINUM

NOTE: The implementation for this feature ended up going in a different direction, and thus this repository is no longer maintained. The code has been archived for posterity.

A Synapse module which augments user directory search results as specified by the French Government deployment. For example, with this module installed, users from the same ministry are more likely to see other users from the same ministry during searches.

Installation

This plugin can be installed into a locally active Python virtualenv via:

pip install -e .

Config

Add the following in your Synapse config:

   user_directory:
     user_directory_search_module:
       module: "matrix_synapse_user_directory_search_dinum.UserDirectorySearchModule"
       config: {}

Configuration Options

Custom configuration can be specified through the user_directory.user_directory_search_module.config option.

Currently, the following options are supported:

  • weighted_display_name_like: Ranks users with a displayname that matches this string (using SQL LIKE syntax) higher than other users. For example, if this option is set to [Modernisation], users with [Modernisation] in their display name will be matched. Disabled if not set.

Development and Testing

This repository uses tox to run linting and tests.

Linting

Code is linted with the flake8 tool. Run tox -e lint to check for linting errors in the codebase.

Tests

This repository uses unittest to run the tests located in the tests directory. They can be ran with tox -e tests.

Making a release

git tag vX.Y.Z
python3 setup.py sdist
twine upload dist/matrix-synapse-user-directory-search-dinum-X.Y.Z.tar.gz
git push origin vX.Y.Z