Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Improvements to bundling aggregations #11815

Merged
merged 12 commits into from
Jan 26, 2022
15 changes: 4 additions & 11 deletions synapse/handlers/room.py
Original file line number Diff line number Diff line change
Expand Up @@ -1195,17 +1195,10 @@ async def filter_evts(events: List[EventBase]) -> List[EventBase]:

# Fetch the aggregations.
aggregations = await self.store.get_bundled_aggregations(
[event], user.to_string()
)
aggregations.update(
await self.store.get_bundled_aggregations(
results["events_before"], user.to_string()
)
)
aggregations.update(
await self.store.get_bundled_aggregations(
results["events_after"], user.to_string()
)
itertools.chain(
results["events_before"], (event,), results["events_after"]
),
user.to_string(),
clokep marked this conversation as resolved.
Show resolved Hide resolved
)

if results["events_after"]:
Expand Down