mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-30 18:23:09 -06:00
Tweak that check again
This commit is contained in:
parent
1d6b620081
commit
42e995792d
|
|
@ -150,7 +150,7 @@ func (r *Queryer) QueryMissingAuthPrevEvents(
|
||||||
|
|
||||||
for _, prevEventID := range request.PrevEventIDs {
|
for _, prevEventID := range request.PrevEventIDs {
|
||||||
state, err := r.DB.StateAtEventIDs(ctx, []string{prevEventID})
|
state, err := r.DB.StateAtEventIDs(ctx, []string{prevEventID})
|
||||||
if err != nil || len(state) == 0 || (state[0].EventTypeNID != types.MRoomCreateNID && state[0].EventStateKeyNID == types.EmptyStateKeyNID && state[0].BeforeStateSnapshotNID == 0) {
|
if err != nil || len(state) == 0 || ((state[0].EventTypeNID != types.MRoomCreateNID || state[0].EventStateKeyNID != types.EmptyStateKeyNID) && state[0].BeforeStateSnapshotNID == 0) {
|
||||||
response.MissingPrevEventIDs = append(response.MissingPrevEventIDs, prevEventID)
|
response.MissingPrevEventIDs = append(response.MissingPrevEventIDs, prevEventID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue