This repository was archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Include bundled events when requesting relations #11087
Copy link
Copy link
Closed
Labels
A-ThreadsThreaded messagesThreaded messagesT-DefectBugs, crashes, hangs, security vulnerabilities, or other reported issues.Bugs, crashes, hangs, security vulnerabilities, or other reported issues.z-p2(Deprecated Label)(Deprecated Label)
Description
In order for MSC3440 to be successful it proposes being explicit about the behavior in MSC2675 that the /relations
API should include the bundled relations of each returned event.
The behavior here was changed a few times:
- Aggregations: include the original event in the response from /relations #5595 asked to include the original event (in the
original_event
field), which was done in Include the original event in /relations #5626. Both of these fields included bundle aggregations (which is a bit odd since you're requesting the relations). - Don't bundle aggregations when retrieving the original event #5654 stopped bundling aggregations in both the original event and the relations events.
The proposal here is to include them on the relations event. Note that #5654 includes the following:
We also do this when pulling the relation events as well, because edits of edits are not something we'd like to support here.
The code in question lies at:
synapse/synapse/rest/client/relations.py
Lines 232 to 237 in 1f9d0b8
# Similarly, we don't allow relations to be applied to relations, so we | |
# return the original relations without any aggregations on top of them | |
# here. | |
serialized_events = await self._event_serializer.serialize_events( | |
events, now, bundle_aggregations=False | |
) |
Which asserts that we don't allow relations to relations, but I don't think this is accurate. If this is a problem for edits we might need to solve this a different way.
Metadata
Metadata
Assignees
Labels
A-ThreadsThreaded messagesThreaded messagesT-DefectBugs, crashes, hangs, security vulnerabilities, or other reported issues.Bugs, crashes, hangs, security vulnerabilities, or other reported issues.z-p2(Deprecated Label)(Deprecated Label)