element-hq / element-hq/synapse

Synapse doesn't use the right pagination format for bundled relations

Open
#10,557 0 comments 0 reactions 0 assignees View on GitHub
A-Spec-Compliance S-Minor T-Defect
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

This issue has been migrated from [#10557](https://github.com/matrix-org/synapse/issues/10557).

---

See https://github.com/uhoreg/matrix-doc/blob/aggregations-helpers/proposals/2675-aggregations-server.md#bundled-relations

The MSC mentions using `chunk`, `limited` and `count`, but Synapse uses a `PaginationChunk` to generate the reactions bundling, which, when turned into a dict, has a `chunk` list and optionally `prev_batch` and `next_batch` fields.

The code in question is: https://github.com/matrix-org/synapse/blob/d0b294ad974c05621426369a00be6bf05c4af997/synapse/events/utils.py#L394-L405

`get_aggregation_groups_for_event` and `get_relations_for_event` both return a `PaginationChunk`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.