summary refs log tree commit diff
path: root/synapse/storage/push_rule.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2018-07-24 09:57:05 +0100
committerGitHub <noreply@github.com>2018-07-24 09:57:05 +0100
commit536bc63a4e6833be9c8700f4382949238f8a4bf4 (patch)
tree5f804ee05b6472691cd12c5cb51d56453d5a367a /synapse/storage/push_rule.py
parentMerge branch 'develop' of github.com:matrix-org/synapse into erikj/client_api... (diff)
parentMerge pull request #3584 from matrix-org/erikj/use_cached (diff)
downloadsynapse-536bc63a4e6833be9c8700f4382949238f8a4bf4.tar.xz
Merge branch 'develop' into erikj/client_apis_move
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 be655d287b..af564b1b4e 100644
--- a/synapse/storage/push_rule.py
+++ b/synapse/storage/push_rule.py
@@ -186,6 +186,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:
@@ -195,9 +196,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,