This repository was archived by the owner on Apr 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -405,12 +405,18 @@ async def get_bundled_aggregations(
405
405
latest_thread_event = thread .latest_event
406
406
if latest_thread_event and latest_thread_event .event_id not in events_by_id :
407
407
events_by_id [latest_thread_event .event_id ] = latest_thread_event
408
- # The latest event in the thread must have a thread relation.
408
+ # Keep relations_by_id in sync with events_by_id:
409
+ #
410
+ # We know that the latest event in a thread has a thread relation
411
+ # (as that is what makes it part of the thread).
409
412
relations_by_id [latest_thread_event .event_id ] = RelationTypes .THREAD
410
413
411
414
# Fetch other relations per event.
412
415
for event in events_by_id .values ():
413
- # Edits and annotations may not have related annotations or references.
416
+ # An event which is a replacement (ie edit) or annotation (ie, reaction)
417
+ # may not have any other event related to it.
418
+ #
419
+ # XXX This is buggy, see https://github.com/matrix-org/synapse/issues/12566
414
420
if relations_by_id .get (event .event_id ) in (
415
421
RelationTypes .ANNOTATION ,
416
422
RelationTypes .REPLACE ,
You can’t perform that action at this time.
0 commit comments