diff options
author | kegsay <kegan@matrix.org> | 2021-07-16 11:35:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-16 11:35:42 +0100 |
commit | 728061db0320f578eebc3d249bdca46ee49fe219 (patch) | |
tree | 4d1b314bd146cb10882efc059ac4e7f69d1ed4c4 /federationapi | |
parent | c102adaf43158ec98ffe337413165ab721ca401b (diff) |
fedsender: try to satisfy all notary key requests from the cache first (#1925)
* fedsender: try to satisfy all notary key requests from the cache first
* Linting
Diffstat (limited to 'federationapi')
-rw-r--r-- | federationapi/routing/keys.go | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/federationapi/routing/keys.go b/federationapi/routing/keys.go index a6b35a5b..d73161e9 100644 --- a/federationapi/routing/keys.go +++ b/federationapi/routing/keys.go @@ -197,16 +197,10 @@ func NotaryKeys( return util.ErrorResponse(err) } } else { - kids := make([]gomatrixserverlib.KeyID, len(kidToCriteria)) - i := 0 - for kid := range kidToCriteria { - kids[i] = kid - i++ - } var resp federationSenderAPI.QueryServerKeysResponse err := fsAPI.QueryServerKeys(httpReq.Context(), &federationSenderAPI.QueryServerKeysRequest{ - ServerName: serverName, - OptionalKeyIDs: kids, + ServerName: serverName, + KeyIDToCriteria: kidToCriteria, }, &resp) if err != nil { return util.ErrorResponse(err) |