mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-02 06:12:45 +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
|
@ -96,8 +96,18 @@ type FederationSenderInternalAPI interface {
|
|||
}
|
||||
|
||||
type QueryServerKeysRequest struct {
|
||||
ServerName gomatrixserverlib.ServerName
|
||||
OptionalKeyIDs []gomatrixserverlib.KeyID
|
||||
ServerName gomatrixserverlib.ServerName
|
||||
KeyIDToCriteria map[gomatrixserverlib.KeyID]gomatrixserverlib.PublicKeyNotaryQueryCriteria
|
||||
}
|
||||
|
||||
func (q *QueryServerKeysRequest) KeyIDs() []gomatrixserverlib.KeyID {
|
||||
kids := make([]gomatrixserverlib.KeyID, len(q.KeyIDToCriteria))
|
||||
i := 0
|
||||
for keyID := range q.KeyIDToCriteria {
|
||||
kids[i] = keyID
|
||||
i++
|
||||
}
|
||||
return kids
|
||||
}
|
||||
|
||||
type QueryServerKeysResponse struct {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue