aboutsummaryrefslogtreecommitdiff
path: root/federationapi
diff options
context:
space:
mode:
authorkegsay <kegan@matrix.org>2021-07-16 11:35:42 +0100
committerGitHub <noreply@github.com>2021-07-16 11:35:42 +0100
commit728061db0320f578eebc3d249bdca46ee49fe219 (patch)
tree4d1b314bd146cb10882efc059ac4e7f69d1ed4c4 /federationapi
parentc102adaf43158ec98ffe337413165ab721ca401b (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.go10
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)