Do the same in the query API

This commit is contained in:
Neil Alexander 2022-02-08 17:25:08 +00:00
parent 92494e1f61
commit 8afdb167f6
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

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