mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 11:06:07 -04:00
Implement remote key lookup api
This commit is contained in:
parent
3ba522bb23
commit
f30d47c876
7 changed files with 252 additions and 61 deletions
|
@ -26,7 +26,7 @@ import logging
|
|||
logger = logging.getLogger(__name__)
|
||||
|
||||
KEY_API_V1 = b"/_matrix/key/v1/"
|
||||
KEY_API_V2 = b"/_matrix/key/v2/local"
|
||||
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def fetch_server_key(server_name, ssl_context_factory, path=KEY_API_V1):
|
||||
|
@ -94,8 +94,8 @@ class SynapseKeyClientProtocol(HTTPClient):
|
|||
if status != b"200":
|
||||
# logger.info("Non-200 response from %s: %s %s",
|
||||
# self.transport.getHost(), status, message)
|
||||
error = SynapseKeyClientError("Non-200 response %r from %r" %
|
||||
(status, self.host)
|
||||
error = SynapseKeyClientError(
|
||||
"Non-200 response %r from %r" % (status, self.host)
|
||||
)
|
||||
error.status = status
|
||||
self.errback(error)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue