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

@ -162,6 +162,10 @@ async def filter_event_for_clients_with_state(
if event.internal_metadata.is_soft_failed():
return []
# Fast path if we don't have any user IDs to check.
if not user_ids:
return ()
# Make a set for all user IDs that haven't been filtered out by a check.
allowed_user_ids = set(user_ids)