summary refs log tree commit diff
path: root/synapse/handlers/relations.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Consolidate logic for parsing relations. (#12693)Patrick Cloke2022-05-161-10/+10
| | | | | | | | | | | | | Parse the `m.relates_to` event content field (which describes relations) in a single place, this is used during: * Event persistence. * Validation of the Client-Server API. * Fetching bundled aggregations. * Processing of push rules. Each of these separately implement the logic and each made slightly different assumptions about what was valid. Some had minor / potential bugs.
* Edits/annotations should not have any bundled aggregations calculated. (#12633)Patrick Cloke2022-05-051-20/+18
| | | | | | Fixes a regression from 8b309adb436c162510ed1402f33b8741d71fc058 (#11660) and b65acead428653b988351ae8d7b22127a22039cd (#11752) where events which themselves were an edit or an annotation could have bundled aggregations calculated, which is not allowed.
* Include bundled aggregations for the latest event in a thread. (#12273)Patrick Cloke2022-05-041-20/+54
| | | | | | The `latest_event` field of the bundled aggregations for `m.thread` relations did not include bundled aggregations itself. This resulted in clients needing to immediately request the event from the server (and thus making it useless that the latest event itself was serialized instead of just including an event ID).
* Consistently use collections.abc.Mapping to check frozendict. (#12564)Patrick Cloke2022-04-271-2/+2
|
* Misc. clean-ups to the relations code (#12519)Patrick Cloke2022-04-251-62/+32
| | | | | * Corrects some typos / copy & paste errors in tests. * Clarifies docstrings. * Removes an unnecessary method.
* Do not consider events by ignored users for bundled aggregations (#12235)Patrick Cloke2022-04-111-30/+214
| | | | | | | Consider the requester's ignored users when calculating the bundled aggregations. See #12285 / 4df10d32148ae29f792afc68ff774bcbd1915cea for corresponding changes for the `/relations` endpoint.
* Remove an unnecessary class from the relations code. (#12338)Patrick Cloke2022-03-311-12/+23
| | | | | The PaginationChunk class attempted to bundle some properties together, but really just caused callers to jump through hoops and hid implementation details.
* Remove the unused and unstable `/aggregations` endpoint. (#12293)Patrick Cloke2022-03-301-4/+2
| | | | | | | | | This endpoint was removed from MSC2675 before it was approved. It is currently unspecified (even in any MSCs) and therefore subject to removal. It is not implemented by any known clients. This also changes the bundled aggregation format for `m.annotation`, which previously included pagination tokens for the `/aggregations` endpoint, which are no longer useful.
* Do not consider events by ignored users for relations (#12285)Patrick Cloke2022-03-241-1/+8
| | | | Filter the events returned from `/relations` for the requester's ignored users in a similar way to `/messages` (and `/sync`).
* Move get_bundled_aggregations to relations handler. (#12237)Patrick Cloke2022-03-181-2/+149
| | | | | The get_bundled_aggregations code is fairly high-level and uses a lot of store methods, we move it into the handler as that seems like a better fit.
* Add a relations handler to avoid duplication. (#12227)Patrick Cloke2022-03-161-0/+117
Adds a handler layer between the REST and datastore layers for relations.