Disable push rule evaluation for rooms excluded from sync (#15361)

* no push for excluded room from sync

* add changelog
Signed-off-by: Maghen Calinghee <maghen.calinghee@beta.gouv.fr>

* correct changelog
This commit is contained in:
mcalinghee 2023-04-27 12:32:02 +02:00 committed by GitHub
parent 3e95c19911
commit 486c059479
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

1
changelog.d/15361.bugfix Normal file
View File

@ -0,0 +1 @@
Disable push rule evaluation for rooms excluded from sync.

View File

@ -326,6 +326,7 @@ class BulkPushRuleEvaluator:
if ( if (
not event.internal_metadata.is_notifiable() not event.internal_metadata.is_notifiable()
or event.internal_metadata.is_historical() 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 # 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 # we want to skip push notification actions for historical messages