diff options
Diffstat (limited to 'federationsender/api/api.go')
-rw-r--r-- | federationsender/api/api.go | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/federationsender/api/api.go b/federationsender/api/api.go index 46e0676d..82cdf9d8 100644 --- a/federationsender/api/api.go +++ b/federationsender/api/api.go @@ -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 { |