forked-synapse/synapse
Andrew Morgan 04819239ba
Add a Synapse Module for configuring presence update routing (#9491)
At the moment, if you'd like to share presence between local or remote users, those users must be sharing a room together. This isn't always the most convenient or useful situation though.

This PR adds a module to Synapse that will allow deployments to set up extra logic on where presence updates should be routed. The module must implement two methods, `get_users_for_states` and `get_interested_users`. These methods are given presence updates or user IDs and must return information that Synapse will use to grant passing presence updates around.

A method is additionally added to `ModuleApi` which allows triggering a set of users to receive the current, online presence information for all users they are considered interested in. This is the equivalent of that user receiving presence information during an initial sync. 

The goal of this module is to be fairly generic and useful for a variety of applications, with hard requirements being:

* Sending state for a specific set or all known users to a defined set of local and remote users.
* The ability to trigger an initial sync for specific users, so they receive all current state.
2021-04-06 14:38:30 +01:00
..
_scripts Strip trailing / from server_url in register_new_matrix_user (#8823) 2020-11-26 10:57:26 +00:00
api Add an experimental room version to support restricted join rules. (#9717) 2021-03-31 16:39:08 -04:00
app Add a Synapse Module for configuring presence update routing (#9491) 2021-04-06 14:38:30 +01:00
appservice Add ResponseCache tests. (#9458) 2021-03-08 14:00:07 -05:00
config Add a Synapse Module for configuring presence update routing (#9491) 2021-04-06 14:38:30 +01:00
crypto Enable addtional flake8-bugbear linting checks. (#9659) 2021-03-24 09:34:30 -04:00
events Add a Synapse Module for configuring presence update routing (#9491) 2021-04-06 14:38:30 +01:00
federation Add a Synapse Module for configuring presence update routing (#9491) 2021-04-06 14:38:30 +01:00
groups Import HomeServer from the proper module. (#9665) 2021-03-23 07:12:48 -04:00
handlers Add a Synapse Module for configuring presence update routing (#9491) 2021-04-06 14:38:30 +01:00
http Update mypy configuration: no_implicit_optional = True (#9742) 2021-04-05 09:10:18 -04:00
logging Improve tracing for to device messages (#9686) 2021-04-01 17:08:21 +01:00
metrics Fix additional type hints from Twisted upgrade. (#9518) 2021-03-03 15:47:38 -05:00
module_api Add a Synapse Module for configuring presence update routing (#9491) 2021-04-06 14:38:30 +01:00
push Import HomeServer from the proper module. (#9665) 2021-03-23 07:12:48 -04:00
replication Update mypy configuration: no_implicit_optional = True (#9742) 2021-04-05 09:10:18 -04:00
res/templates Support not providing an IdP icon when choosing a username. (#9440) 2021-02-19 07:48:46 -05:00
rest Add type hints to expiring cache. (#9730) 2021-04-06 08:58:18 -04:00
server_notices Add a type hints for service notices to the HomeServer object. (#9675) 2021-03-24 06:48:46 -04:00
spam_checker_api Combine SpamCheckerApi with the more generic ModuleApi. (#8464) 2020-10-07 12:03:26 +01:00
state Add type hints to expiring cache. (#9730) 2021-04-06 08:58:18 -04:00
static Add initial support for a "pick your IdP" page (#9017) 2021-01-05 11:25:28 +00:00
storage Remove outdated constraint on remote_media_cache_thumbnails (#9725) 2021-04-06 13:36:05 +01:00
streams Make token serializing/deserializing async (#8427) 2020-09-30 20:29:19 +01:00
util Add type hints to expiring cache. (#9730) 2021-04-06 08:58:18 -04:00
__init__.py 1.31.0 2021-04-06 13:09:56 +01:00
event_auth.py Add an experimental room version to support restricted join rules. (#9717) 2021-03-31 16:39:08 -04:00
notifier.py Update mypy configuration: no_implicit_optional = True (#9742) 2021-04-05 09:10:18 -04:00
python_dependencies.py Fix the suggested pip incantation for cryptography (#9699) 2021-03-29 11:55:33 +01:00
secrets.py Add type hints to misc. files. (#9676) 2021-03-24 06:49:01 -04:00
server.py Add a Synapse Module for configuring presence update routing (#9491) 2021-04-06 14:38:30 +01:00
types.py Convert Requester to attrs (#9586) 2021-03-10 18:15:56 +00:00
visibility.py Add type hints to misc. files. (#9676) 2021-03-24 06:49:01 -04:00