summary refs log tree commit diff
path: root/synapse/push
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2016-01-06 11:58:46 +0000
committerDavid Baker <dave@matrix.org>2016-01-06 11:58:46 +0000
commit992928304f3c95f87a3297799965159d295432ea (patch)
tree36c9cdac575c154f3c823f0ac6c135e0dd54360e /synapse/push
parentAdd schema change file for is_guest flag (diff)
downloadsynapse-992928304f3c95f87a3297799965159d295432ea.tar.xz
Delete notifications for redacted events
Diffstat (limited to 'synapse/push')
-rw-r--r--synapse/push/action_generator.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/synapse/push/action_generator.py b/synapse/push/action_generator.py
index bcd40798f9..4cf94f6c61 100644
--- a/synapse/push/action_generator.py
+++ b/synapse/push/action_generator.py
@@ -19,6 +19,8 @@ import bulk_push_rule_evaluator
 
 import logging
 
+from synapse.api.constants import EventTypes
+
 logger = logging.getLogger(__name__)
 
 
@@ -34,6 +36,11 @@ class ActionGenerator:
 
     @defer.inlineCallbacks
     def handle_push_actions_for_event(self, event, handler):
+        if event.type == EventTypes.Redaction and event.redacts is not None:
+            yield self.store.remove_push_actions_for_event_id(
+                event.room_id, event.redacts
+            )
+
         bulk_evaluator = yield bulk_push_rule_evaluator.evaluator_for_room_id(
             event.room_id, self.store
         )