summary refs log tree commit diff
path: root/synapse/push
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2020-06-12 15:11:01 +0100
committerBrendan Abolivier <babolivier@matrix.org>2020-06-12 15:13:12 +0100
commite47e5a2dcd2e7210c3830c3f0b8420a8b0988133 (patch)
tree4740a158f4d4903b20ed9237960bfd98b8f7be64 /synapse/push
parentPre-populate the unread_count column (diff)
downloadsynapse-e47e5a2dcd2e7210c3830c3f0b8420a8b0988133.tar.xz
Incorporate review bits
Diffstat (limited to 'synapse/push')
-rw-r--r--synapse/push/bulk_push_rule_evaluator.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/synapse/push/bulk_push_rule_evaluator.py b/synapse/push/bulk_push_rule_evaluator.py
index f7c3db5828..3244d39c37 100644
--- a/synapse/push/bulk_push_rule_evaluator.py
+++ b/synapse/push/bulk_push_rule_evaluator.py
@@ -191,13 +191,12 @@ class BulkPushRuleEvaluator(object):
                 )
                 if matches:
                     actions = [x for x in rule["actions"] if x != "dont_notify"]
-                    if actions:
-                        if (
-                            "notify" in actions
-                            or "org.matrix.msc2625.mark_unread" in actions
-                        ):
-                            # Push rules say we should act on this event.
-                            actions_by_user[uid] = actions
+                    if (
+                        "notify" in actions
+                        or "org.matrix.msc2625.mark_unread" in actions
+                    ):
+                        # Push rules say we should act on this event.
+                        actions_by_user[uid] = actions
                     break
 
         # Mark in the DB staging area the push actions for users who should be