summary refs log tree commit diff
path: root/synapse/push/action_generator.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-01-19 16:01:05 +0000
committerErik Johnston <erik@matrix.org>2016-01-19 16:01:05 +0000
commit5a7d1ecffcab7a94caf70471a2eec56eb868573c (patch)
treebfe7fb4d0529969d70ad02ccb103d1343a7d6224 /synapse/push/action_generator.py
parentHandle glob -> regex errors (diff)
downloadsynapse-5a7d1ecffcab7a94caf70471a2eec56eb868573c.tar.xz
Add regex cache. Only caculate push actions for users that have sent read receipts, and are on that server
Diffstat (limited to 'synapse/push/action_generator.py')
-rw-r--r--synapse/push/action_generator.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/synapse/push/action_generator.py b/synapse/push/action_generator.py
index 4cf94f6c61..1d2e558f9a 100644
--- a/synapse/push/action_generator.py
+++ b/synapse/push/action_generator.py
@@ -25,8 +25,9 @@ logger = logging.getLogger(__name__)
 
 
 class ActionGenerator:
-    def __init__(self, store):
-        self.store = store
+    def __init__(self, hs):
+        self.hs = hs
+        self.store = hs.get_datastore()
         # really we want to get all user ids and all profile tags too,
         # since we want the actions for each profile tag for every user and
         # also actions for a client with no profile tag for each user.
@@ -42,7 +43,7 @@ class ActionGenerator:
             )
 
         bulk_evaluator = yield bulk_push_rule_evaluator.evaluator_for_room_id(
-            event.room_id, self.store
+            event.room_id, self.hs, self.store
         )
 
         actions_by_user = yield bulk_evaluator.action_for_event_by_user(event, handler)