summary refs log tree commit diff
path: root/synapse/storage/databases/main/relations.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Support stable identifiers for MSC3440: Threading (#12151)Patrick Cloke2022-03-101-30/+47
| | | | The unstable identifiers are still supported if the experimental configuration flag is enabled. The unstable identifiers will be removed in a future release.
* Allow retrieving the relations of a redacted event. (#12130)Patrick Cloke2022-03-101-28/+32
| | | | | | | | | This is allowed per MSC2675, although the original implementation did not allow for it and would return an empty chunk / not bundle aggregations. The main thing to improve is that the various caches get cleared properly when an event is redacted, and that edits must not leak if the original event is redacted (as that would presumably leak something similar to the original event content).
* Fix a typo in a comment.Patrick Cloke2022-02-161-1/+1
|
* Fix incorrect thread summaries when the latest event is edited. (#11992)Patrick Cloke2022-02-151-6/+18
| | | | | If the latest event in a thread was edited than the original event content was included in bundled aggregation for threads instead of the edited event content.
* Fetch thread summaries for multiple events in a single query (#11752)Patrick Cloke2022-02-111-73/+149
| | | | | This should reduce database usage when fetching bundled aggregations as the number of individual queries (and round trips to the database) are reduced.
* Support pagination tokens from /sync and /messages in the relations API. ↵Patrick Cloke2022-02-101-15/+31
| | | | (#11952)
* Experimental support to include bundled aggregations in search results ↵Patrick Cloke2022-02-081-2/+11
| | | | (MSC3666) (#11837)
* Fetch edits for multiple events in a single query. (#11660)Patrick Cloke2022-02-081-51/+99
| | | | | This should reduce database usage when fetching bundled aggregations as the number of individual queries (and round trips to the database) are reduced.
* Remove the obsolete MSC1849 configuration flag. (#11843)Patrick Cloke2022-01-311-4/+0
| | | | | MSC1849 was replaced by MSC2675, which was merged. The configuration flag, which defaulted to true, is no longer useful.
* Improvements to bundling aggregations. (#11815)Patrick Cloke2022-01-261-23/+38
| | | | | | | | | | | 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 whether the requesting user has participated in a thread. (#11577)Patrick Cloke2022-01-181-11/+55
| | | | | | Per updates to MSC3440. This is implement as a separate method since it needs to be cached on a per-user basis, instead of a per-thread basis.
* Bundle aggregations outside of the serialization method. (#11612)Patrick Cloke2022-01-071-3/+125
| | | | | | | | 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.
* Improve type hints in storage classes. (#11652)Dirk Klimpel2021-12-291-2/+2
| | | By using cast and making ignores more specific.
* Remove redundant `COALESCE()`s around `COUNT()`s in database queries (#11570)Sean Quah2021-12-141-1/+1
| | | | | `COUNT()` never returns `NULL`. A `COUNT(*)` over 0 rows is 0 and a `COUNT(NULL)` is also 0.
* Do not allow cross-room relations, per MSC2674. (#11516)Patrick Cloke2021-12-091-10/+26
|
* Do not allow MSC3440 threads to fork threads (#11161)Patrick Cloke2021-11-181-2/+65
| | | | | | | | | | | Adds validation to the Client-Server API to ensure that the potential thread head does not relate to another event already. This results in not allowing a thread to "fork" into other threads. If the target event is unknown for some reason (maybe it isn't visible to your homeserver), but is the target of other events it is assumed that the thread can be created from it. Otherwise, it is rejected as an unknown event.
* Support filtering by relations per MSC3440 (#11236)Patrick Cloke2021-11-091-1/+57
| | | | Adds experimental support for `relation_types` and `relation_senders` fields for filters.
* Additional type hints for relations database class. (#11205)Patrick Cloke2021-10-281-15/+23
|
* Add a thread relation type per MSC3440. (#11088)Patrick Cloke2021-10-211-1/+58
| | | | Adds experimental support for MSC3440's `io.element.thread` relation type (and the aggregation for it).
* 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>`
* Convert additional databases to async/await (#8199)Patrick Cloke2020-09-011-55/+48
|
* Convert appservice, group server, profile and more databases to async (#8066)Patrick Cloke2020-08-121-9/+10
|
* Rename database classes to make some sense (#8033)Erik Johnston2020-08-051-0/+327