main ← fix-bump-date-on-post-recovery
merged 09:01AM - 02 Jan 26 UTC
When a reply is deleted, we reset the topic's bump date to the previous post's d…ate so the topic returns to its rightful place in /latest. However, if that reply is later recovered, the bump date wasn't being restored, leaving the topic buried even though it has a recent reply.
This used to work by accident: recovering a user-deleted post would call `revise()` to restore the original content, and editing the last post would bump the topic. When #34681 removed bumping on edits, this side effect went away, exposing the missing logic in the recovery path.
The fix mirrors what we already do for `hide!/unhide!` - call `reset_bumped_at` with the recovered post if it's the last visible reply. We need to reload the topic first since `update_statistics` updates the database directly and our in-memory object would have a stale `highest_post_number`.
Ref - https://meta.discourse.org/t/388501