mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-24 21:54:08 +01:00
SYN-383: Extract the response list from 'server_keys' in the response JSON as it might work better than iterating over the top level dict
This commit is contained in:
parent
99914ec9f8
commit
c6a03c46e6
1 changed files with 3 additions and 1 deletions
|
@ -188,7 +188,7 @@ class Keyring(object):
|
||||||
# TODO(mark): Set the minimum_valid_until_ts to that needed by
|
# TODO(mark): Set the minimum_valid_until_ts to that needed by
|
||||||
# the events being validated or the current time if validating
|
# the events being validated or the current time if validating
|
||||||
# an incoming request.
|
# an incoming request.
|
||||||
responses = yield self.client.post_json(
|
query_response = yield self.client.post_json(
|
||||||
destination=perspective_name,
|
destination=perspective_name,
|
||||||
path=b"/_matrix/key/v2/query",
|
path=b"/_matrix/key/v2/query",
|
||||||
data={
|
data={
|
||||||
|
@ -204,6 +204,8 @@ class Keyring(object):
|
||||||
|
|
||||||
keys = {}
|
keys = {}
|
||||||
|
|
||||||
|
responses = query_response["server_keys"]
|
||||||
|
|
||||||
for response in responses:
|
for response in responses:
|
||||||
if (u"signatures" not in response
|
if (u"signatures" not in response
|
||||||
or perspective_name not in response[u"signatures"]):
|
or perspective_name not in response[u"signatures"]):
|
||||||
|
|
Loading…
Reference in a new issue