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

Commit

Permalink
Clean up 'self._federation' var
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjohnston committed Apr 19, 2021
1 parent 63c8516 commit ee9a5ce
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions synapse/handlers/presence.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,9 @@ def __init__(self, hs: "HomeServer"):
self.state = hs.get_state_handler()

self._federation = None
if hs.should_send_federation() or not hs.config.worker_app:
if hs.should_send_federation():
self._federation = hs.get_federation_sender()

self._send_federation = hs.should_send_federation()

self._federation_queue = PresenceFederationQueue(hs, self)

self._busy_presence_enabled = hs.config.experimental.msc3026_enabled
Expand Down Expand Up @@ -277,12 +275,9 @@ async def maybe_send_presence_to_interested_destinations(
destinations that are interested.
"""

if not self._send_federation:
if not self._federation:
return

# If this worker sends federation we must have a FederationSender.
assert self._federation

hosts_and_states = await get_interested_remotes(
self.store,
self.presence_router,
Expand Down

0 comments on commit ee9a5ce

Please sign in to comment.