From 77b1e91333ce6e57130c19a8c0e2b88116b33e0b Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Mon, 28 Sep 2020 15:38:10 +0100 Subject: [PATCH] Use processEvent --- federationapi/routing/send.go | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/federationapi/routing/send.go b/federationapi/routing/send.go index 3e4c90c41..0643242fb 100644 --- a/federationapi/routing/send.go +++ b/federationapi/routing/send.go @@ -375,17 +375,8 @@ func (t *txnReq) processEvent(ctx context.Context, e gomatrixserverlib.Event, is logrus.WithError(err).Warnf("Failed to unmarshal auth event %d", missingAuthEventID) continue } - err = api.SendEvents( - context.Background(), - t.rsAPI, - []gomatrixserverlib.HeaderedEvent{ - ev.Headered(stateResp.RoomVersion), - }, - api.DoNotSendToOtherServers, - nil, - ) - if err != nil { - logrus.WithError(err).Warnf("Failed to submit auth event %d to roomserver", missingAuthEventID) + if err = t.processEvent(ctx, ev, false); err != nil { + logrus.WithError(err).Warnf("Failed to process auth event %d", missingAuthEventID) } } }