diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2021-09-15 08:34:52 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-15 08:34:52 -0400 |
commit | 8c7a531e277f98ac6b7981b9738649f3a70feb94 (patch) | |
tree | a6e0088d17ee9c12218d3c21bc163f5cc7231848 /synapse/handlers/presence.py | |
parent | Verify `?chunk_id` actually corresponds to an insertion event that exists (MS... (diff) | |
download | synapse-8c7a531e277f98ac6b7981b9738649f3a70feb94.tar.xz |
Use direct references for some configuration variables (part 2) (#10812)
Diffstat (limited to 'synapse/handlers/presence.py')
-rw-r--r-- | synapse/handlers/presence.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py index 39b39cd3e2..4ab962a84b 100644 --- a/synapse/handlers/presence.py +++ b/synapse/handlers/presence.py @@ -374,7 +374,7 @@ class WorkerPresenceHandler(BasePresenceHandler): self._presence_writer_instance = hs.config.worker.writers.presence[0] - self._presence_enabled = hs.config.use_presence + self._presence_enabled = hs.config.server.use_presence # Route presence EDUs to the right worker hs.get_federation_registry().register_instances_for_edu( @@ -584,7 +584,7 @@ class WorkerPresenceHandler(BasePresenceHandler): user_id = target_user.to_string() # If presence is disabled, no-op - if not self.hs.config.use_presence: + if not self.hs.config.server.use_presence: return # Proxy request to instance that writes presence @@ -601,7 +601,7 @@ class WorkerPresenceHandler(BasePresenceHandler): with the app. """ # If presence is disabled, no-op - if not self.hs.config.use_presence: + if not self.hs.config.server.use_presence: return # Proxy request to instance that writes presence @@ -618,7 +618,7 @@ class PresenceHandler(BasePresenceHandler): self.server_name = hs.hostname self.wheel_timer: WheelTimer[str] = WheelTimer() self.notifier = hs.get_notifier() - self._presence_enabled = hs.config.use_presence + self._presence_enabled = hs.config.server.use_presence federation_registry = hs.get_federation_registry() @@ -916,7 +916,7 @@ class PresenceHandler(BasePresenceHandler): with the app. """ # If presence is disabled, no-op - if not self.hs.config.use_presence: + if not self.hs.config.server.use_presence: return user_id = user.to_string() @@ -949,7 +949,7 @@ class PresenceHandler(BasePresenceHandler): """ # Override if it should affect the user's presence, if presence is # disabled. - if not self.hs.config.use_presence: + if not self.hs.config.server.use_presence: affect_presence = False if affect_presence: |