Also update the snapshot on the latest events

This commit is contained in:
Till Faelligen 2023-11-15 19:50:21 +01:00
parent 16b97f9e6c
commit c1ca1cca45
No known key found for this signature in database
GPG key ID: 3DF82D8AB9211D4E

View file

@ -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))