mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-07 06:03:09 -06:00
Tweak that some more
This commit is contained in:
parent
77587352ca
commit
7790b5fe55
|
|
@ -204,12 +204,6 @@ 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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -225,13 +225,12 @@ func (u *RoomUpdater) SetLatestEvents(
|
|||
if err := u.d.RoomsTable.UpdateLatestEventNIDs(u.ctx, txn, roomNID, eventNIDs, lastEventNIDSent, currentStateSnapshotNID); err != nil {
|
||||
return fmt.Errorf("u.d.RoomsTable.updateLatestEventNIDs: %w", err)
|
||||
}
|
||||
if roomID, ok := u.d.Cache.GetRoomServerRoomID(roomNID); ok {
|
||||
if roomInfo, ok := u.d.Cache.GetRoomInfo(roomID); ok {
|
||||
roomInfo.StateSnapshotNID = currentStateSnapshotNID
|
||||
roomInfo.IsStub = false
|
||||
u.d.Cache.StoreRoomInfo(roomID, roomInfo)
|
||||
}
|
||||
}
|
||||
|
||||
// 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.StateSnapshotNID = currentStateSnapshotNID
|
||||
u.roomInfo.IsStub = false
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue