mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-29 12:42:46 +00:00
Initial notary support (#1436)
* Initial work on notary support * Somewhat working (but not properly filtered) notary support, other tweaks * Update gomatrixserverlib
This commit is contained in:
parent
a7563ede3d
commit
a14b29b526
11 changed files with 229 additions and 15 deletions
|
@ -189,3 +189,27 @@ func (a *FederationSenderInternalAPI) GetEvent(
|
|||
}
|
||||
return ires.(gomatrixserverlib.Transaction), nil
|
||||
}
|
||||
|
||||
func (a *FederationSenderInternalAPI) GetServerKeys(
|
||||
ctx context.Context, s gomatrixserverlib.ServerName,
|
||||
) (gomatrixserverlib.ServerKeys, error) {
|
||||
ires, err := a.doRequest(s, func() (interface{}, error) {
|
||||
return a.federation.GetServerKeys(ctx, s)
|
||||
})
|
||||
if err != nil {
|
||||
return gomatrixserverlib.ServerKeys{}, err
|
||||
}
|
||||
return ires.(gomatrixserverlib.ServerKeys), nil
|
||||
}
|
||||
|
||||
func (a *FederationSenderInternalAPI) LookupServerKeys(
|
||||
ctx context.Context, s gomatrixserverlib.ServerName, keyRequests map[gomatrixserverlib.PublicKeyLookupRequest]gomatrixserverlib.Timestamp,
|
||||
) ([]gomatrixserverlib.ServerKeys, error) {
|
||||
ires, err := a.doRequest(s, func() (interface{}, error) {
|
||||
return a.federation.LookupServerKeys(ctx, s, keyRequests)
|
||||
})
|
||||
if err != nil {
|
||||
return []gomatrixserverlib.ServerKeys{}, err
|
||||
}
|
||||
return ires.([]gomatrixserverlib.ServerKeys), nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue