summary refs log tree commit diff
path: root/synapse/push/baserules.py
diff options
context:
space:
mode:
authorŠimon Brandner <simon.bra.ag@gmail.com>2022-05-10 09:57:36 +0200
committerGitHub <noreply@github.com>2022-05-10 08:57:36 +0100
commitade30088212091284d066fc31a755a8a21050677 (patch)
tree5398226fb0090584da6856db2a61b3fe1cad8056 /synapse/push/baserules.py
parentUpdate `replication.md` with info on TCP module structure (#12621) (diff)
downloadsynapse-ade30088212091284d066fc31a755a8a21050677.tar.xz
Implement MSC3786: Add a default push rule to ignore m.room.server_acl events (#12601)
Fixes vector-im/element-web#20788
Implements matrix-org/matrix-spec-proposals#3786
Diffstat (limited to 'synapse/push/baserules.py')
-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 f42f605f23..a17b35a605 100644
--- a/synapse/push/baserules.py
+++ b/synapse/push/baserules.py
@@ -277,6 +277,21 @@ BASE_APPEND_OVERRIDE_RULES: List[Dict[str, Any]] = [
         ],
         "actions": ["dont_notify"],
     },
+    # XXX: This is an experimental rule that is only enabled if msc3786_enabled
+    # is enabled, if it is not the rule gets filtered out in _load_rules() in
+    # PushRulesWorkerStore
+    {
+        "rule_id": "global/override/.org.matrix.msc3786.rule.room.server_acl",
+        "conditions": [
+            {
+                "kind": "event_match",
+                "key": "type",
+                "pattern": "m.room.server_acl",
+                "_cache_key": "_room_server_acl",
+            }
+        ],
+        "actions": ["dont_notify"],
+    },
 ]