summary refs log tree commit diff
path: root/synapse/events/presence_router.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Correctly mention previous copyright (#16820)Erik Johnston2024-01-231-0/+1
| | | | | During the migration the automated script to update the copyright headers accidentally got rid of some of the existing copyright lines. Reinstate them.
* Update license headersPatrick Cloke2023-11-211-10/+16
|
* Implement cancellation support/protection for module callbacks (#12568)Sean Quah2022-05-091-3/+9
| | | | | | | | | | | | There's no guarantee that module callbacks will handle cancellation appropriately. Protect module callbacks with read semantics from cancellation and avoid swallowing `CancelledError`s that arise. Other module callbacks, such as the `on_*` callbacks, are presumed to live on code paths that involve writes and aren't cancellation-friendly. These module callbacks have been left alone. Signed-off-by: Sean Quah <seanq@element.io>
* Use `ParamSpec` in a few places (#12667)David Robertson2022-05-091-3/+12
|
* Update mypy to 0.950 and fix complaints (#12650)David Robertson2022-05-061-1/+3
|
* Add type hints to synapse.events.*. (#11066)Patrick Cloke2021-10-131-10/+11
| | | Except `synapse/events/__init__.py`, which will be done in a follow-up.
* Use direct references for configuration variables (part 6). (#10916)Patrick Cloke2021-09-291-3/+3
|
* Port the PresenceRouter module interface to the new generic interface (#10524)Azrenbeth2021-08-171-36/+156
| | | Port the PresenceRouter module interface to the new generic interface introduced in v1.37.0
* Remove redundant "coding: utf-8" lines (#9786)Jonathan de Jong2021-04-141-1/+0
| | | | | | | Part of #9744 Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now. `Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>`
* Add a Synapse Module for configuring presence update routing (#9491)Andrew Morgan2021-04-061-0/+104
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.