Update the RoomInfo since it might have come from the cache

This commit is contained in:
Neil Alexander 2022-07-13 09:52:03 +01:00
parent a420012df1
commit 77587352ca
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -204,6 +204,12 @@ func (u *latestEventsUpdater) doUpdateLatestEvents() error {
return fmt.Errorf("u.updater.MarkEventAsSent: %w", err)
}
// Since it's entirely possible that this types.RoomInfo came from the
// cache, we should make sure to update that entry so that the next run
// works from live data.
u.roomInfo.IsStub = false
u.roomInfo.StateSnapshotNID = u.newStateNID
return nil
}