Use direct references for configuration variables (part 4). (#10893)

This commit is contained in:
Patrick Cloke 2021-09-23 12:03:01 -04:00 committed by GitHub
parent a10988983a
commit 47854c71e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 77 additions and 64 deletions

View file

@ -97,7 +97,9 @@ class RemoteKey(DirectServeJsonResource):
self.fetcher = ServerKeyFetcher(hs)
self.store = hs.get_datastore()
self.clock = hs.get_clock()
self.federation_domain_whitelist = hs.config.federation_domain_whitelist
self.federation_domain_whitelist = (
hs.config.federation.federation_domain_whitelist
)
self.config = hs.config
async def _async_render_GET(self, request: Request) -> None:
@ -235,7 +237,7 @@ class RemoteKey(DirectServeJsonResource):
signed_keys = []
for key_json in json_results:
key_json = json_decoder.decode(key_json.decode("utf-8"))
for signing_key in self.config.key_server_signing_keys:
for signing_key in self.config.key.key_server_signing_keys:
key_json = sign_json(
key_json, self.config.server.server_name, signing_key
)