Don't treat rejected events without state as missing

This commit is contained in:
Neil Alexander 2022-02-06 16:37:36 +00:00
parent 4b6139b62e
commit 0845a6e918
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -149,7 +149,11 @@ func (r *Queryer) QueryMissingAuthPrevEvents(
}
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)
}
}