Don't mark state events with zero snapshot NID as not existing

This commit is contained in:
Neil Alexander 2022-01-06 17:22:46 +00:00
parent ad19c2b81a
commit 110ab7b8f3
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
5 changed files with 14 additions and 17 deletions

View file

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