From 486c059479c3f1fefa8470d41f34a9571d447c00 Mon Sep 17 00:00:00 2001 From: mcalinghee Date: Thu, 27 Apr 2023 12:32:02 +0200 Subject: [PATCH] Disable push rule evaluation for rooms excluded from sync (#15361) * no push for excluded room from sync * add changelog Signed-off-by: Maghen Calinghee * correct changelog --- changelog.d/15361.bugfix | 1 + synapse/push/bulk_push_rule_evaluator.py | 1 + 2 files changed, 2 insertions(+) create mode 100644 changelog.d/15361.bugfix diff --git a/changelog.d/15361.bugfix b/changelog.d/15361.bugfix new file mode 100644 index 000000000..2cd795e57 --- /dev/null +++ b/changelog.d/15361.bugfix @@ -0,0 +1 @@ +Disable push rule evaluation for rooms excluded from sync. \ No newline at end of file diff --git a/synapse/push/bulk_push_rule_evaluator.py b/synapse/push/bulk_push_rule_evaluator.py index 199337673..320084f5f 100644 --- a/synapse/push/bulk_push_rule_evaluator.py +++ b/synapse/push/bulk_push_rule_evaluator.py @@ -326,6 +326,7 @@ class BulkPushRuleEvaluator: if ( not event.internal_metadata.is_notifiable() or event.internal_metadata.is_historical() + or event.room_id in self.hs.config.server.rooms_to_exclude_from_sync ): # Push rules for events that aren't notifiable can't be processed by this and # we want to skip push notification actions for historical messages