summary refs log tree commit diff
path: root/synapse/storage/push_rule.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2018-07-23 17:15:12 +0100
committerRichard van der Hoff <richard@matrix.org>2018-07-23 17:15:12 +0100
commit4f5cc8e4e796153cbdc09517e521fc3a23eb66c2 (patch)
treeccaa25ba8cec666b88ac217f6495cf59663550b0 /synapse/storage/push_rule.py
parentRemove redundant checks on room forgottenness (diff)
parentMerge pull request #3582 from matrix-org/erikj/fixup_stateless (diff)
downloadsynapse-4f5cc8e4e796153cbdc09517e521fc3a23eb66c2.tar.xz
Merge remote-tracking branch 'origin/develop' into rav/remove_who_forgot_in_room
Diffstat (limited to 'synapse/storage/push_rule.py')
-rw-r--r--synapse/storage/push_rule.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/synapse/storage/push_rule.py b/synapse/storage/push_rule.py
index d25b39ec02..6a5028961d 100644
--- a/synapse/storage/push_rule.py
+++ b/synapse/storage/push_rule.py
@@ -185,6 +185,7 @@ class PushRulesWorkerStore(ApplicationServiceWorkerStore,
 
         defer.returnValue(results)
 
+    @defer.inlineCallbacks
     def bulk_get_push_rules_for_room(self, event, context):
         state_group = context.state_group
         if not state_group:
@@ -194,9 +195,11 @@ class PushRulesWorkerStore(ApplicationServiceWorkerStore,
             # To do this we set the state_group to a new object as object() != object()
             state_group = object()
 
-        return self._bulk_get_push_rules_for_room(
-            event.room_id, state_group, context.current_state_ids, event=event
+        current_state_ids = yield context.get_current_state_ids(self)
+        result = yield self._bulk_get_push_rules_for_room(
+            event.room_id, state_group, current_state_ids, event=event
         )
+        defer.returnValue(result)
 
     @cachedInlineCallbacks(num_args=2, cache_context=True)
     def _bulk_get_push_rules_for_room(self, room_id, state_group, current_state_ids,