summary refs log tree commit diff
path: root/synapse/push/baserules.py
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2015-02-26 18:58:14 +0000
committerDavid Baker <dave@matrix.org>2015-02-26 18:58:14 +0000
commitcfac3b7873e95f1c643708b9a3fddc7c37896826 (patch)
treee7a2ef489165639657cb5eaa012d5ffa23c0a2d0 /synapse/push/baserules.py
parentAdd API for getting/setting enabled-ness of push rules. (diff)
downloadsynapse-cfac3b7873e95f1c643708b9a3fddc7c37896826.tar.xz
SYN-267 Add a fallback rule as an explicit server default rule and make the default dont-notify so you effectively have a "notify for everything else" switch you can turn on and off.
Diffstat (limited to '')
-rw-r--r--synapse/push/baserules.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/synapse/push/baserules.py b/synapse/push/baserules.py
index f4d2be11f6..09878b63c1 100644
--- a/synapse/push/baserules.py
+++ b/synapse/push/baserules.py
@@ -32,6 +32,8 @@ def make_base_rules(user, kind):
 
     if kind == 'override':
         rules = make_base_override_rules()
+    elif kind == 'underride':
+        rules = make_base_underride_rules()
     elif kind == 'content':
         rules = make_base_content_rules(user)
 
@@ -98,3 +100,16 @@ def make_base_override_rules():
             ]
         }
     ]
+
+
+def make_base_underride_rules():
+    return [
+        {
+            'rule_id': 'global/underride/.m.rule.fallback',
+            'conditions': [
+            ],
+            'actions': [
+                'notify',
+            ]
+        },
+    ]