Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Drive-by hoisting
Browse files Browse the repository at this point in the history
  • Loading branch information
reivilibre committed Dec 29, 2022
1 parent 4ca8e45 commit a9f3e28
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions synapse/handlers/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -1531,13 +1531,13 @@ async def cache_joined_hosts_for_events(
external federation senders don't have to recalculate it themselves.
"""

for event, event_context in events_and_context:
if not self._external_cache.is_enabled():
return
if not self._external_cache.is_enabled():
return

# If external cache is enabled we should always have this.
assert self._external_cache_joined_hosts_updates is not None
# If external cache is enabled we should always have this.
assert self._external_cache_joined_hosts_updates is not None

for event, event_context in events_and_context:
if event_context.partial_state:
# We can't precalculate joined hosts for a partial-state event,
# (at least not without blocking until full state).
Expand Down

0 comments on commit a9f3e28

Please sign in to comment.