summary refs log tree commit diff
path: root/synapse/push/__init__.py
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2015-03-10 17:26:25 +0000
committerDavid Baker <dave@matrix.org>2015-03-10 17:26:25 +0000
commit04f8478aaa02d11ce079d1eaeabcfba88b1fcee7 (patch)
tree5ca8117876ce9507421c5e4c53c117a7171e6577 /synapse/push/__init__.py
parentThese aren't defined for redacted events so don't crash (diff)
downloadsynapse-04f8478aaa02d11ce079d1eaeabcfba88b1fcee7.tar.xz
Add the master push rule for the break-my-push button. Allow server default rules to be disabled by default.
Diffstat (limited to 'synapse/push/__init__.py')
-rw-r--r--synapse/push/__init__.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/push/__init__.py b/synapse/push/__init__.py
index 3da0ce8703..c98aca60b9 100644
--- a/synapse/push/__init__.py
+++ b/synapse/push/__init__.py
@@ -105,7 +105,11 @@ class Pusher(object):
             room_member_count += 1
 
         for r in rules:
-            if r['rule_id'] in enabled_map and not enabled_map[r['rule_id']]:
+            if r['rule_id'] in enabled_map:
+                r['enabled'] = enabled_map[r['rule_id']]
+            elif 'enabled' not in r:
+                r['enabled'] = True
+            if not r['enabled']:
                 continue
             matches = True