From 77587352cac776be165b15750ee4f2b274988d63 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Wed, 13 Jul 2022 09:52:03 +0100 Subject: [PATCH] Update the `RoomInfo` since it might have come from the cache --- roomserver/internal/input/input_latest_events.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/roomserver/internal/input/input_latest_events.go b/roomserver/internal/input/input_latest_events.go index f7d15fdb5..798891baf 100644 --- a/roomserver/internal/input/input_latest_events.go +++ b/roomserver/internal/input/input_latest_events.go @@ -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 }