mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-16 02:23:10 -06:00
Only apply rejection check to outliers
This commit is contained in:
parent
2c7bc85bd6
commit
6411457f8b
|
|
@ -119,11 +119,12 @@ func (r *Inputer) processRoomEvent(
|
||||||
return fmt.Errorf("room %s does not exist for event %s", event.RoomID(), event.EventID())
|
return fmt.Errorf("room %s does not exist for event %s", event.RoomID(), event.EventID())
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we already know about this event and it hasn't been rejected
|
// If we already know about this outlier and it hasn't been rejected
|
||||||
// then we won't attempt to reprocess it. If it was rejected then we
|
// then we won't attempt to reprocess it. If it was rejected or has now
|
||||||
// can attempt to reprocess, in case we have learned something new
|
// arrived as a different kind of event, then we can attempt to reprocess,
|
||||||
// that will allow us to accept the event this time.
|
// in case we have learned something new or need to weave the event into
|
||||||
if roomInfo != nil {
|
// the DAG now.
|
||||||
|
if input.Kind == api.KindOutlier && roomInfo != nil {
|
||||||
wasRejected, werr := r.DB.IsEventRejected(ctx, roomInfo.RoomNID, event.EventID())
|
wasRejected, werr := r.DB.IsEventRejected(ctx, roomInfo.RoomNID, event.EventID())
|
||||||
switch {
|
switch {
|
||||||
case werr == sql.ErrNoRows:
|
case werr == sql.ErrNoRows:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue