summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-05-31 16:42:21 +0100
committerErik Johnston <erik@matrix.org>2016-05-31 16:42:21 +0100
commitc9ca285d336f769eacd2f160a05744aedd40bbcb (patch)
tree0e5efad5164816d5586dea3bc43fd21e87cf6367 /synapse
parentMerge pull request #804 from matrix-org/erikj/push_rules_cache (diff)
parentFix typo (diff)
downloadsynapse-c9ca285d336f769eacd2f160a05744aedd40bbcb.tar.xz
Merge pull request #805 from matrix-org/erikj/push_rules_cache
Fix GET /push_rules
Diffstat (limited to 'synapse')
-rw-r--r--synapse/storage/push_rule.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/synapse/storage/push_rule.py b/synapse/storage/push_rule.py
index f285f59afd..216a8bf69c 100644
--- a/synapse/storage/push_rule.py
+++ b/synapse/storage/push_rule.py
@@ -66,7 +66,10 @@ class PushRuleStore(SQLBaseStore):
         if not user_ids:
             defer.returnValue({})
 
-        results = {}
+        results = {
+            user_id: []
+            for user_id in user_ids
+        }
 
         rows = yield self._simple_select_many_batch(
             table="push_rules",
@@ -90,7 +93,10 @@ class PushRuleStore(SQLBaseStore):
         if not user_ids:
             defer.returnValue({})
 
-        results = {}
+        results = {
+            user_id: {}
+            for user_id in user_ids
+        }
 
         rows = yield self._simple_select_many_batch(
             table="push_rules_enable",