Send auth events as outliers

This commit is contained in:
Neil Alexander 2020-09-29 10:20:09 +01:00
parent 4bcdb8fa0c
commit 4cdc223ed6
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -393,10 +393,21 @@ func (t *txnReq) processEvent(ctx context.Context, e gomatrixserverlib.Event, is
logger.WithError(err).Errorf("Failed to unmarshal auth event %q", missingAuthEventID)
continue // try the next server
}
if err = t.processEvent(ctx, ev, false); err != nil {
logger.WithError(err).Errorf("Failed to process auth event %q", missingAuthEventID)
if err = api.SendInputRoomEvents(
context.Background(),
t.rsAPI,
[]api.InputRoomEvent{
{
Kind: api.KindOutlier,
Event: ev.Headered(stateResp.RoomVersion),
AuthEventIDs: ev.AuthEventIDs(),
SendAsServer: api.DoNotSendToOtherServers,
},
},
); err != nil {
logger.WithError(err).Errorf("Failed to send auth event %q to roomserver", missingAuthEventID)
continue getAuthEvent // move onto the next event
}
continue getAuthEvent // move onto the next event
}
}
}