Care about state when checking missing prev events

This commit is contained in:
Neil Alexander 2022-01-21 10:26:24 +00:00
parent 078345a29d
commit d93ddb08d1
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -149,7 +149,7 @@ func (r *Queryer) QueryMissingAuthPrevEvents(
}
for _, prevEventID := range request.PrevEventIDs {
if nids, err := r.DB.EventNIDs(ctx, []string{prevEventID}); err != nil || len(nids) == 0 {
if state, err := r.DB.StateAtEventIDs(ctx, []string{prevEventID}); err != nil || len(state) == 0 {
response.MissingPrevEventIDs = append(response.MissingPrevEventIDs, prevEventID)
}
}