mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-30 04:52:46 +00:00
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
This commit is contained in:
parent
c102adaf43
commit
728061db03
6 changed files with 82 additions and 23 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue