summary refs log tree commit diff
path: root/synapse/push/baserules.py
diff options
context:
space:
mode:
authorDavid Baker <dbkr@users.noreply.github.com>2016-03-24 13:48:02 +0000
committerDavid Baker <dbkr@users.noreply.github.com>2016-03-24 13:48:02 +0000
commit31e6f8636f5fcf72fee18fd1842aa227d7ce5b97 (patch)
tree9581e4504c16300a1ae71fa8fc2e3520f6e89a3d /synapse/push/baserules.py
parentMerge pull request #666 from matrix-org/erikj/intern (diff)
parentNever notify for member events. This fixes https://github.com/vector-im/vecto... (diff)
downloadsynapse-31e6f8636f5fcf72fee18fd1842aa227d7ce5b97.tar.xz
Merge pull request #667 from matrix-org/dbkr/never_notify_member_events
Never notify for member events.
Diffstat (limited to 'synapse/push/baserules.py')
-rw-r--r--synapse/push/baserules.py41
1 files changed, 21 insertions, 20 deletions
diff --git a/synapse/push/baserules.py b/synapse/push/baserules.py
index 86a2998bcc..792af70eb7 100644
--- a/synapse/push/baserules.py
+++ b/synapse/push/baserules.py
@@ -160,7 +160,27 @@ BASE_APPEND_OVRRIDE_RULES = [
         'actions': [
             'dont_notify',
         ]
-    }
+    },
+    # Will we sometimes want to know about people joining and leaving?
+    # Perhaps: if so, this could be expanded upon. Seems the most usual case
+    # is that we don't though. We add this override rule so that even if
+    # the room rule is set to notify, we don't get notifications about
+    # join/leave/avatar/displayname events.
+    # See also: https://matrix.org/jira/browse/SYN-607
+    {
+        'rule_id': 'global/override/.m.rule.member_event',
+        'conditions': [
+            {
+                'kind': 'event_match',
+                'key': 'type',
+                'pattern': 'm.room.member',
+                '_id': '_member',
+            }
+        ],
+        'actions': [
+            'dont_notify'
+        ]
+    },
 ]
 
 
@@ -261,25 +281,6 @@ BASE_APPEND_UNDERRIDE_RULES = [
             }
         ]
     },
-    # This is too simple: https://matrix.org/jira/browse/SYN-607
-    # Removing for now
-    # {
-    #     'rule_id': 'global/underride/.m.rule.member_event',
-    #     'conditions': [
-    #         {
-    #             'kind': 'event_match',
-    #             'key': 'type',
-    #             'pattern': 'm.room.member',
-    #             '_id': '_member',
-    #         }
-    #     ],
-    #     'actions': [
-    #         'notify', {
-    #             'set_tweak': 'highlight',
-    #             'value': False
-    #         }
-    #     ]
-    # },
     {
         'rule_id': 'global/underride/.m.rule.message',
         'conditions': [