forked-synapse/synapse/events
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
..
__init__.py Prep work for removing outlier from internal_metadata (#9411) 2021-03-17 12:33:18 +00:00
builder.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
presence_router.py Add a Synapse Module for configuring presence update routing (#9491) 2021-04-06 14:38:30 +01:00
snapshot.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
spamcheck.py Pass SSO IdP information to spam checker's registration function (#9626) 2021-03-16 12:41:41 +00:00
third_party_rules.py Add type hints to misc. files. (#9676) 2021-03-24 06:49:01 -04:00
utils.py Ensure we use a copy of the event content dict before modifying it in serialize_event (#9585) 2021-03-17 16:51:55 +00:00
validator.py Block clients from sending server ACLs that lock the local server out. (#8708) 2020-11-03 12:13:48 +00:00