Look for missing auth events in RS input

This commit is contained in:
Neil Alexander 2021-12-14 11:38:08 +00:00
parent 9c327d431c
commit 18cef55d04
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
7 changed files with 216 additions and 5 deletions

View file

@ -10,6 +10,20 @@ import (
// Functions here are "proxying" calls to the gomatrixserverlib federation
// client.
func (a *FederationInternalAPI) GetEventAuth(
ctx context.Context, s gomatrixserverlib.ServerName, roomID, eventID string,
) (res gomatrixserverlib.RespEventAuth, err error) {
ctx, cancel := context.WithTimeout(ctx, time.Second*30)
defer cancel()
ires, err := a.doRequest(s, func() (interface{}, error) {
return a.federation.GetEventAuth(ctx, s, roomID, eventID)
})
if err != nil {
return gomatrixserverlib.RespEventAuth{}, err
}
return ires.(gomatrixserverlib.RespEventAuth), nil
}
func (a *FederationInternalAPI) GetUserDevices(
ctx context.Context, s gomatrixserverlib.ServerName, userID string,
) (gomatrixserverlib.RespUserDevices, error) {