Asynchronous roomserver input from federation API /send

This commit is contained in:
Neil Alexander 2021-06-30 15:01:19 +01:00
parent 2647f6e9c5
commit ca42568640
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
4 changed files with 42 additions and 15 deletions

View file

@ -556,6 +556,7 @@ func (t *txnReq) processEvent(ctx context.Context, e *gomatrixserverlib.Event) e
},
api.DoNotSendToOtherServers,
nil,
api.InputOptionAsync,
)
}
@ -598,6 +599,7 @@ withNextEvent:
SendAsServer: api.DoNotSendToOtherServers,
},
},
api.InputOptionAsync,
); err != nil {
return fmt.Errorf("api.SendEvents: %w", err)
}
@ -747,6 +749,7 @@ func (t *txnReq) processEventWithMissingState(
resolvedState,
backwardsExtremity.Headered(roomVersion),
t.hadEvents,
api.InputOptionAsync,
)
if err != nil {
return fmt.Errorf("api.SendEventWithState: %w", err)
@ -767,6 +770,7 @@ func (t *txnReq) processEventWithMissingState(
append(headeredNewEvents, e.Headered(roomVersion)),
api.DoNotSendToOtherServers,
nil,
api.InputOptionAsync,
); err != nil {
return fmt.Errorf("api.SendEvents: %w", err)
}