Don't count rejected events as missing
This commit is contained in:
parent
78a9a6de2a
commit
4b6139b62e
|
@ -316,7 +316,7 @@ func (s *eventStatements) BulkSelectStateAtEventByID(
|
|||
}
|
||||
// Genuine create events are the only case where it's OK to have no previous state.
|
||||
isCreate := result.EventTypeNID == types.MRoomCreateNID && result.EventStateKeyNID == 1
|
||||
if result.BeforeStateSnapshotNID == 0 && !isCreate {
|
||||
if result.BeforeStateSnapshotNID == 0 && !result.IsRejected && !isCreate {
|
||||
return nil, types.MissingEventError(
|
||||
fmt.Sprintf("storage: missing state for event NID %d", result.EventNID),
|
||||
)
|
||||
|
|
|
@ -327,7 +327,7 @@ func (s *eventStatements) BulkSelectStateAtEventByID(
|
|||
}
|
||||
// Genuine create events are the only case where it's OK to have no previous state.
|
||||
isCreate := result.EventTypeNID == types.MRoomCreateNID && result.EventStateKeyNID == 1
|
||||
if result.BeforeStateSnapshotNID == 0 && !isCreate {
|
||||
if result.BeforeStateSnapshotNID == 0 && !result.IsRejected && !isCreate {
|
||||
return nil, types.MissingEventError(
|
||||
fmt.Sprintf("storage: missing state for event NID %d", result.EventNID),
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue