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

Commit a9f3e28

Browse files
committed
Drive-by hoisting
1 parent 4ca8e45 commit a9f3e28

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

synapse/handlers/message.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1531,13 +1531,13 @@ async def cache_joined_hosts_for_events(
15311531
external federation senders don't have to recalculate it themselves.
15321532
"""
15331533

1534-
for event, event_context in events_and_context:
1535-
if not self._external_cache.is_enabled():
1536-
return
1534+
if not self._external_cache.is_enabled():
1535+
return
15371536

1538-
# If external cache is enabled we should always have this.
1539-
assert self._external_cache_joined_hosts_updates is not None
1537+
# If external cache is enabled we should always have this.
1538+
assert self._external_cache_joined_hosts_updates is not None
15401539

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

0 commit comments

Comments
 (0)