diff options
author | Erik Johnston <erik@matrix.org> | 2022-09-30 17:40:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-30 17:40:33 +0100 |
commit | 535f8c8f7d64d4058500a5988278fd3026645164 (patch) | |
tree | 6b2e4d6f83964e5761ba976f359d684522b8de60 /synapse/visibility.py | |
parent | Update mypy and mypy-zope, attempt 3 (#13993) (diff) | |
download | synapse-535f8c8f7d64d4058500a5988278fd3026645164.tar.xz |
Skip filtering during push if there are no push actions (#13992)
Diffstat (limited to 'synapse/visibility.py')
-rw-r--r-- | synapse/visibility.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/visibility.py b/synapse/visibility.py index c810a05907..c4048d2477 100644 --- a/synapse/visibility.py +++ b/synapse/visibility.py @@ -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) |