mirror of
https://github.com/matrix-org/dendrite.git
synced 2024-12-04 12:11:55 -06:00
Might as well do all events this way
This commit is contained in:
parent
c2df0b3efa
commit
1f15cfc6a3
|
@ -107,19 +107,17 @@ func (r *Inputer) processRoomEvent(
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we already know about this outlier and it hasn't been rejected
|
// If we already know about this event 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 then we
|
||||||
// can attempt to reprocess, in case we have learned something new
|
// can attempt to reprocess, in case we have learned something new
|
||||||
// that will allow us to accept the event this time.
|
// that will allow us to accept the event this time.
|
||||||
if input.Kind == api.KindOutlier {
|
wasRejected, werr := r.DB.IsEventRejected(ctx, event.EventID())
|
||||||
rejected, err := r.DB.IsEventRejected(ctx, event.EventID())
|
if werr != nil && werr != sql.ErrNoRows {
|
||||||
if err != nil && err != sql.ErrNoRows {
|
return werr
|
||||||
return err
|
}
|
||||||
}
|
if !wasRejected {
|
||||||
if !rejected {
|
logger.Debugf("Already processed event %q, ignoring", event.EventID())
|
||||||
logger.Debugf("Already processed event %q, ignoring", event.EventID())
|
return nil
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't waste time processing the event if the room doesn't exist.
|
// Don't waste time processing the event if the room doesn't exist.
|
||||||
|
|
Loading…
Reference in a new issue