Handle create events better

This commit is contained in:
Neil Alexander 2022-01-21 11:26:26 +00:00
parent 61437d6e44
commit 4253eccfb3
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
3 changed files with 3 additions and 5 deletions

View file

@ -150,9 +150,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 state[0].EventTypeNID != types.MRoomCreateNID {
response.MissingPrevEventIDs = append(response.MissingPrevEventIDs, prevEventID)
}
response.MissingPrevEventIDs = append(response.MissingPrevEventIDs, prevEventID)
}
}