mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-12-15 13:18:45 -05:00
Include whether the requesting user has participated in a thread. (#11577)
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.
This commit is contained in:
parent
251b5567ec
commit
68acb0a29d
9 changed files with 86 additions and 19 deletions
|
|
@ -1182,12 +1182,18 @@ class RoomContextHandler:
|
|||
results["event"] = filtered[0]
|
||||
|
||||
# Fetch the aggregations.
|
||||
aggregations = await self.store.get_bundled_aggregations([results["event"]])
|
||||
aggregations.update(
|
||||
await self.store.get_bundled_aggregations(results["events_before"])
|
||||
aggregations = await self.store.get_bundled_aggregations(
|
||||
[results["event"]], user.to_string()
|
||||
)
|
||||
aggregations.update(
|
||||
await self.store.get_bundled_aggregations(results["events_after"])
|
||||
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()
|
||||
)
|
||||
)
|
||||
results["aggregations"] = aggregations
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue