summary refs log tree commit diff
path: root/synapse/push/baserules.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2017-10-11 13:19:29 +0100
committerGitHub <noreply@github.com>2017-10-11 13:19:29 +0100
commitdfbf73408ccbc4b40056a785ff42ccedf205409b (patch)
treebc4e696549308f7af2da15a7ea457fb01d99d269 /synapse/push/baserules.py
parentMerge pull request #2483 from jeremycline/unfreeze-ujson-dump (diff)
parentpep8 (diff)
downloadsynapse-dfbf73408ccbc4b40056a785ff42ccedf205409b.tar.xz
Merge pull request #2501 from matrix-org/dbkr/channel_notifications
Support for channel notifications
Diffstat (limited to 'synapse/push/baserules.py')
-rw-r--r--synapse/push/baserules.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/synapse/push/baserules.py b/synapse/push/baserules.py
index 85effdfa46..9dce99ebec 100644
--- a/synapse/push/baserules.py
+++ b/synapse/push/baserules.py
@@ -1,4 +1,5 @@
 # Copyright 2015, 2016 OpenMarket Ltd
+# Copyright 2017 New Vector Ltd
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -238,6 +239,28 @@ BASE_APPEND_OVERRIDE_RULES = [
             }
         ]
     },
+    {
+        'rule_id': 'global/override/.m.rule.roomnotif',
+        'conditions': [
+            {
+                'kind': 'event_match',
+                'key': 'content.body',
+                'pattern': '*@room*',
+                '_id': '_roomnotif_content',
+            },
+            {
+                'kind': 'sender_notification_permission',
+                'key': 'room',
+                '_id': '_roomnotif_pl',
+            },
+        ],
+        'actions': [
+            'notify', {
+                'set_tweak': 'highlight',
+                'value': True,
+            }
+        ]
+    }
 ]