mirror of
https://github.com/matrix-org/dendrite
synced 2024-12-14 05:03:48 +01:00
Don't count rejected events as missing
This commit is contained in:
parent
78a9a6de2a
commit
4b6139b62e
2 changed files with 2 additions and 2 deletions
|
@ -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