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

Commit

Permalink
Access config option directly
Browse files Browse the repository at this point in the history
  • Loading branch information
anoadragon453 committed Oct 27, 2022
1 parent d68d86c commit e1614de
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions synapse/handlers/e2e_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@

class E2eKeysHandler:
def __init__(self, hs: "HomeServer"):
self.config = hs.config
self.store = hs.get_datastores().main
self.federation = hs.get_federation_client()
self.device_handler = hs.get_device_handler()
Expand All @@ -59,9 +60,6 @@ def __init__(self, hs: "HomeServer"):

federation_registry = hs.get_federation_registry()

self._allow_device_name_lookup_over_federation = (
hs.config.federation.allow_device_name_lookup_over_federation
)
self._is_master = hs.config.worker.worker_app is None
if not self._is_master:
self._user_device_resync_client = (
Expand Down Expand Up @@ -514,7 +512,9 @@ async def on_federation_query_client_keys(
)
res = await self.query_local_devices(
device_keys_query,
include_displaynames=self._allow_device_name_lookup_over_federation,
include_displaynames=(
self.config.federation.allow_device_name_lookup_over_federation
),
)
ret = {"device_keys": res}

Expand Down

0 comments on commit e1614de

Please sign in to comment.