synapse/tests
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
..
api Make RateLimiter class check for ratelimit overrides (#9711) 2021-03-30 12:06:09 +01:00
app Remove spurious "SynapseRequest" result from `make_request" 2020-12-15 22:35:40 +00:00
appservice Add ability for access tokens to belong to one user but grant access to another user. (#8616) 2020-10-29 15:58:44 +00:00
config Fix reported bugbear: too broad exception assertion (#9753) 2021-04-06 13:48:22 +01:00
crypto Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
events Add a Synapse Module for configuring presence update routing (#9491) 2021-04-06 14:38:30 +01:00
federation Make federation catchup send last event from any server. (#9640) 2021-03-18 15:52:26 +00:00
handlers Add a Synapse Module for configuring presence update routing (#9491) 2021-04-06 14:38:30 +01:00
http Allow providing credentials to HTTPS_PROXY (#9657) 2021-03-22 17:20:47 +00:00
logging Various clean-ups to the logging context code (#8935) 2020-12-14 14:19:47 -05:00
module_api Add a Synapse Module for configuring presence update routing (#9491) 2021-04-06 14:38:30 +01:00
push Test that we require validated email for email pushers (#9496) 2021-02-25 15:35:14 +00:00
replication Fix CI by ignore type for None module import (#9709) 2021-03-29 14:42:38 +01:00
rest Update mypy configuration: `no_implicit_optional = True` (#9742) 2021-04-05 09:10:18 -04:00
scripts Port register_new_matrix_user to Python 3 and add tests (#4085) 2018-10-26 22:05:22 +11:00
server_notices Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
state Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
storage Convert storage test cases to HomeserverTestCase. (#9736) 2021-04-06 07:21:02 -04:00
test_utils Fix additional type hints. (#9543) 2021-03-09 07:41:32 -05:00
util Add type hints to DictionaryCache and TTLCache. (#9442) 2021-03-29 12:15:33 -04:00
__init__.py Move patch_inline_callbacks into synapse/ 2019-10-10 10:53:06 +01:00
server.py Make it possible to use dmypy (#9692) 2021-03-26 16:49:46 +00:00
test_distributor.py Run black. 2018-08-10 23:54:09 +10:00
test_event_auth.py Add an experimental room version to support restricted join rules. (#9717) 2021-03-31 16:39:08 -04:00
test_federation.py Various clean-ups to the logging context code (#8935) 2020-12-14 14:19:47 -05:00
test_mau.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
test_metrics.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
test_phone_home.py Allow background tasks to be run on a separate worker. (#8369) 2020-10-02 08:23:15 -04:00
test_preview.py Handle additional errors when previewing URLs. (#9333) 2021-02-08 12:33:30 -05:00
test_server.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
test_state.py Add admin API for logging in as a user (#8617) 2020-11-17 10:51:25 +00:00
test_terms_auth.py Remove spurious "SynapseRequest" result from `make_request" 2020-12-15 22:35:40 +00:00
test_test_utils.py Run black. 2018-08-10 23:54:09 +10:00
test_types.py Add basic domain validation for `DomainSpecificString.is_valid`. (#9071) 2021-01-13 07:05:16 -05:00
test_visibility.py Stop sub-classing object (#8249) 2020-09-04 06:54:56 -04:00
unittest.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
utils.py Replace `room_invite_state_types` with `room_prejoin_state` (#9700) 2021-03-30 12:12:44 +01:00