Only complain about invalid state deltas for non-overwrite events

This commit is contained in:
Kegan Dougal 2020-10-20 10:39:11 +01:00
parent 0c9765f8d9
commit 67175e2331

View file

@ -233,7 +233,7 @@ func (u *latestEventsUpdater) latestState() error {
if err != nil {
return fmt.Errorf("roomState.DifferenceBetweenStateSnapshots: %w", err)
}
if len(u.removed) > len(u.added) {
if !u.stateAtEvent.Overwrite && len(u.removed) > len(u.added) {
// This really shouldn't happen.
// TODO: What is ultimately the best way to handle this situation?
logrus.Errorf(