From c1ca1cca45b63be2196c2c4c73b6bffc484e1bdc Mon Sep 17 00:00:00 2001 From: Till Faelligen <2353100+S7evinK@users.noreply.github.com> Date: Wed, 15 Nov 2023 19:50:21 +0100 Subject: [PATCH] Also update the snapshot on the latest events --- cmd/resolve-state/main.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmd/resolve-state/main.go b/cmd/resolve-state/main.go index 5cc8af9a9..f8d888b71 100644 --- a/cmd/resolve-state/main.go +++ b/cmd/resolve-state/main.go @@ -330,6 +330,14 @@ func main() { fmt.Printf("Error: %s", err) return } + + for _, latestEvent := range roomUpdater.LatestEvents() { + if err = roomUpdater.SetState(ctx, latestEvent.EventNID, newSnapshotNID); err != nil { + fmt.Printf("Error: %s", err) + return + } + } + succeeded = true fmt.Printf("Successfully set new snapshot NID %d containing %d state events", newSnapshotNID, len(stateEntriesResolved))