summary refs log tree commit diff
path: root/synapse/rest/client/sync.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Pass the device ID around in the presence handler (#16171)Patrick Cloke2023-08-281-0/+1
| | | | | | Refactoring to pass the device ID (in addition to the user ID) through the presence handler (specifically the `user_syncing`, `set_state`, and `bump_presence_active_time` methods and their replication versions).
* `N + 3`: Read from column `full_user_id` rather than `user_id` of tables ↵Shay2023-06-021-1/+1
| | | | `profiles` and `user_filters` (#15649)
* Add a primitive helper script for listing worker endpoints. (#15243)reivilibre2023-03-231-0/+1
| | | | Co-authored-by: Patrick Cloke <patrickc@matrix.org>
* Pass the requester during event serialization. (#15174)Quentin Gliech2023-03-061-5/+5
| | | | This allows Synapse to properly include the transaction ID in the unsigned data of events.
* Fix a long-standing bug where an initial sync would not respond to changes ↵reivilibre2023-02-281-2/+23
| | | | to the list of ignored users if there was an initial sync cached. (#15163)
* Return NOT_JSON if decode fails and defer set_timeline_upper_limit ca… ↵Ryan Miguel2022-10-241-4/+4
| | | | | | | (#14262) * Return NOT_JSON if decode fails and defer set_timeline_upper_limit call until after check_valid_filter. Fixes #13661. Signed-off-by: Ryan Miguel <miguel.ryanj@gmail.com>. * Reword changelog
* Use stable identifiers for MSC3771 & MSC3773. (#14050)Patrick Cloke2022-10-071-3/+6
| | | | | These are both part of Matrix 1.4 which has now been released. For now, support both the unstable and stable identifiers.
* Track notification counts per thread (implement MSC3773). (#13776)Patrick Cloke2022-10-041-0/+4
| | | | | | | | When retrieving counts of notifications segment the results based on the thread ID, but choose whether to return them as individual threads or as a single summed field by letting the client opt-in via a sync flag. The summarization code is also updated to be per thread, instead of per room.
* Add type annotations to `trace` decorator. (#13328)Patrick Cloke2022-07-191-6/+6
| | | | Functions that are decorated with `trace` are now properly typed and the type hints for them are fixed.
* Additional constants for EDU types. (#12884)Patrick Cloke2022-05-271-2/+2
| | | Instead of hard-coding strings in many places.
* Remove user-visible groups/communities code (#12553)Patrick Cloke2022-05-251-8/+0
| | | | | | | | | Makes it so that groups/communities no longer exist from a user-POV. E.g. we remove: * All API endpoints (including Client-Server, Server-Server, and admin). * Documented configuration options (and the experimental flag, which is now unused). * Special handling during room upgrades. * The `groups` section of the `/sync` response.
* Prevent a sync request from removing a user's busy presence status (#12213)David Baker2022-04-131-6/+3
| | | | | | | | | | In trying to use the MSC3026 busy presence status, the user's status would be set back to 'online' next time they synced. This change makes it so that syncing does not affect a user's presence status if it is currently set to 'busy': it must be removed through the presence API. The MSC defers to implementations on the behaviour of busy presence, so this ought to remain compatible with the MSC.
* Do not add groups to sync results if disabled. (#12408)Patrick Cloke2022-04-071-8/+7
|
* Move MSC2654 support behind an experimental configuration flag. (#12295)Patrick Cloke2022-03-311-1/+3
| | | To match the current thinking on disabling experimental features by default.
* Use the proper serialization format when bundling aggregations. (#12090)Patrick Cloke2022-03-031-94/+38
| | | | This ensures that the `latest_event` field of the bundled aggregation for threads uses the same format as the other events in the response.
* Remove `HomeServer.get_datastore()` (#12031)Richard van der Hoff2022-02-231-1/+1
| | | | | | | The presence of this method was confusing, and mostly present for backwards compatibility. Let's get rid of it. Part of #11733
* Improvements to bundling aggregations. (#11815)Patrick Cloke2022-01-261-1/+2
| | | | | | | | | | | This is some odds and ends found during the review of #11791 and while continuing to work in this code: * Return attrs classes instead of dictionaries from some methods to improve type safety. * Call `get_bundled_aggregations` fewer times. * Adds a missing assertion in the tests. * Do not return empty bundled aggregations for an event (preferring to not include the bundle at all, as the docstring states).
* Include bundled aggregations in the sync response cache. (#11659)Patrick Cloke2022-01-131-14/+3
|
* Bundle aggregations outside of the serialization method. (#11612)Patrick Cloke2022-01-071-17/+22
| | | | | | | | This makes the serialization of events synchronous (and it no longer access the database), but we must manually calculate and provide the bundled aggregations. Overall this should cause no change in behavior, but is prep work for other improvements.
* Various opentracing enhancements (#11619)Richard van der Hoff2021-12-211-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | * Wrap `auth.get_user_by_req` in an opentracing span give `get_user_by_req` its own opentracing span, since it can result in a non-trivial number of sub-spans which it is useful to group together. This requires a bit of reorganisation because it also sets some tags (and may force tracing) on the servlet span. * Emit opentracing span for encoding json responses This can be a significant time sink. * Rename all sync spans with a prefix * Write an opentracing span for encoding sync response * opentracing span to group generate_room_entries * opentracing spans within sync.encode_response * changelog * Use the `trace` decorator instead of context managers
* Merge remote-tracking branch 'origin/release-v1.49' into developRichard van der Hoff2021-12-201-1/+9
|\
| * Disable aggregation bundling on `/sync` responses (#11583)Richard van der Hoff2021-12-201-1/+9
| | | | | | | | | | | | | | | | | | | | | | * Disable aggregation bundling on `/sync` responses A partial revert of #11478. This turns out to have had a significant CPU impact on initial-sync handling. For now, let's disable it, until we find a more efficient way of achieving this. * Fix tests. Co-authored-by: Patrick Cloke <patrickc@matrix.org>
* | Support unprefixed versions of fallback key property names. (#11541)Hubert Chathi2021-12-091-0/+3
|/
* Include bundled aggregations in /sync and related fixes (#11478)Patrick Cloke2021-12-061-3/+3
| | | | | | | | Due to updates to MSC2675 this includes a few fixes: * Include bundled aggregations for /sync. * Do not include bundled aggregations for /initialSync and /events. * Do not bundle aggregations for state events. * Clarifies comments and variable names.
* Refactor the code to inject bundled relations during serialization. (#11408)Patrick Cloke2021-11-231-1/+1
|
* Support filtering by relations per MSC3440 (#11236)Patrick Cloke2021-11-091-3/+3
| | | | Adds experimental support for `relation_types` and `relation_senders` fields for filters.
* Use direct references for configuration variables (part 6). (#10916)Patrick Cloke2021-09-291-1/+1
|
* Additional type hints for client REST servlets (part 4) (#10728)Patrick Cloke2021-09-011-2/+14
|
* Additional type hints for the sync REST servlet. (#10666)Patrick Cloke2021-08-231-51/+81
|
* Flatten the synapse.rest.client package (#10600)reivilibre2021-08-171-0/+532