summary refs log tree commit diff
path: root/synapse/storage/databases/main/relations.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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