mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-01 03:03:10 -06:00
Don't treat rejected events without state as missing
This commit is contained in:
parent
4b6139b62e
commit
0845a6e918
|
|
@ -149,7 +149,11 @@ func (r *Queryer) QueryMissingAuthPrevEvents(
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, prevEventID := range request.PrevEventIDs {
|
for _, prevEventID := range request.PrevEventIDs {
|
||||||
if state, err := r.DB.StateAtEventIDs(ctx, []string{prevEventID}); err != nil || len(state) == 0 {
|
state, err := r.DB.StateAtEventIDs(ctx, []string{prevEventID})
|
||||||
|
if len(state) == 1 && state[0].IsRejected {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if err != nil || len(state) == 0 {
|
||||||
response.MissingPrevEventIDs = append(response.MissingPrevEventIDs, prevEventID)
|
response.MissingPrevEventIDs = append(response.MissingPrevEventIDs, prevEventID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue