summary refs log tree commit diff
path: root/synapse/handlers/room.py
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2022-01-18 11:38:57 -0500
committerGitHub <noreply@github.com>2022-01-18 11:38:57 -0500
commit68acb0a29dcb03a0ecbcebdb95e09c5999598f42 (patch)
treea14144b467bf09b1a60a608a511f2065ac1d16a0 /synapse/handlers/room.py
parentRemove `log_function` and its uses (#11761) (diff)
downloadsynapse-68acb0a29dcb03a0ecbcebdb95e09c5999598f42.tar.xz
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.
Diffstat (limited to 'synapse/handlers/room.py')
-rw-r--r--synapse/handlers/room.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index 3d47163f25..f963078e59 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -1182,12 +1182,18 @@ class RoomContextHandler:
         results["event"] = filtered[0]
 
         # Fetch the aggregations.
-        aggregations = await self.store.get_bundled_aggregations([results["event"]])
+        aggregations = await self.store.get_bundled_aggregations(
+            [results["event"]], user.to_string()
+        )
         aggregations.update(
-            await self.store.get_bundled_aggregations(results["events_before"])
+            await self.store.get_bundled_aggregations(
+                results["events_before"], user.to_string()
+            )
         )
         aggregations.update(
-            await self.store.get_bundled_aggregations(results["events_after"])
+            await self.store.get_bundled_aggregations(
+                results["events_after"], user.to_string()
+            )
         )
         results["aggregations"] = aggregations