Exclude rejected events in calculateAndSetState

This commit is contained in:
Neil Alexander 2022-08-18 14:14:04 +01:00
parent cadf06927c
commit 43c34d2575
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -661,7 +661,7 @@ func (r *Inputer) calculateAndSetState(
// We've been told what the state at the event is so we don't need to calculate it.
// Check that those state events are in the database and store the state.
var entries []types.StateEntry
if entries, err = r.DB.StateEntriesForEventIDs(ctx, input.StateEventIDs, false); err != nil {
if entries, err = r.DB.StateEntriesForEventIDs(ctx, input.StateEventIDs, true); err != nil {
return fmt.Errorf("updater.StateEntriesForEventIDs: %w", err)
}
entries = types.DeduplicateStateEntries(entries)