Skip filtering during push if there are no push actions (#13992)

This commit is contained in:
Erik Johnston 2022-09-30 17:40:33 +01:00 committed by GitHub
parent 285d72556b
commit 535f8c8f7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 2 deletions

View file

@ -332,6 +332,11 @@ class BulkPushRuleEvaluator:
# Push rules say we should notify the user of this event
actions_by_user[uid] = actions
# If there aren't any actions then we can skip the rest of the
# processing.
if not actions_by_user:
return
# This is a check for the case where user joins a room without being
# allowed to see history, and then the server receives a delayed event
# from before the user joined, which they should not be pushed for