summary refs log tree commit diff
path: root/synapse/push
diff options
context:
space:
mode:
authorDavid Baker <dbkr@users.noreply.github.com>2016-01-22 17:27:25 +0000
committerDavid Baker <dbkr@users.noreply.github.com>2016-01-22 17:27:25 +0000
commitf92fe15897e15b8d6a091d0ee7ff0d2fe12d9caf (patch)
tree019dda9b7bdba6b875239071e6deeac113c3f7d4 /synapse/push
parentMerge pull request #522 from matrix-org/dbkr/no_push_unless_notify (diff)
parentBetter fix for actions with both dont_notify and tweaks (diff)
downloadsynapse-f92fe15897e15b8d6a091d0ee7ff0d2fe12d9caf.tar.xz
Merge pull request #523 from matrix-org/dbkr/no_push_unless_notify
Better fix for actions with both dont_notify and tweaks
Diffstat (limited to 'synapse/push')
-rw-r--r--synapse/push/bulk_push_rule_evaluator.py10
1 files changed, 1 insertions, 9 deletions
diff --git a/synapse/push/bulk_push_rule_evaluator.py b/synapse/push/bulk_push_rule_evaluator.py
index c211c58923..20c60422bf 100644
--- a/synapse/push/bulk_push_rule_evaluator.py
+++ b/synapse/push/bulk_push_rule_evaluator.py
@@ -139,16 +139,8 @@ class BulkPushRuleEvaluator:
                     evaluator, rule['conditions'], uid, display_name, condition_cache
                 )
                 if matches:
-                    notify = False
-                    actions = []
-                    for a in rule['actions']:
-                        if a != 'dont_notify':
-                            actions.append(a)
-                        elif a == 'notify':
-                            notify = True
-
                     actions = [x for x in rule['actions'] if x != 'dont_notify']
-                    if actions and notify:
+                    if actions and 'notify' in actions:
                         actions_by_user[uid] = actions
                     break
         defer.returnValue(actions_by_user)