# 取消删除回复不会更改帖子置顶日期

**URL:** https://meta.discourse.org/t/undeleting-replies-does-not-change-the-topics-bump-date/388501
**Category:** Bug
**Created:** [2025 年11 月 14 日 16:47 UTC](https://meta.discourse.org/t/undeleting-replies-does-not-change-the-topics-bump-date/388501 "2025-11-14T16:47:07Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [2025 年11 月 14 日 16:47 UTC](https://meta.discourse.org/t/undeleting-replies-does-not-change-the-topics-bump-date/388501/1 "2025-11-14T16:47:08Z")

</div>

意外删除后又恢复的回复很可能会被忽略，因为删除回复会将“最新回复时间”重置为上一次回复的时间，但恢复回复并不会将其改回为最新回复的时间。

重现步骤：

1. 回复一个最近没有被“顶”起来的主题
2. 检查“最新”列表，确认该主题已被“顶”到最上面
3. 删除你的回复
4. 检查“最新”列表，确保“最新回复时间”已按预期重置
5. 恢复你的回复

**预期结果：** 该主题会回到“最新”列表的最上面，因为有最新的回复  
**实际结果：** 该主题仍然停留在回复被删除时的位置，这意味着别人不太可能注意到这个回复

注意：在 [https://github.com/discourse/discourse/pull/33747](https://github.com/discourse/discourse/pull/33747) 合并后，此功能仍然有效。我认为原因是恢复回复被视为一次编辑，触发了主题的“顶”操作。但自 [https://github.com/discourse/discourse/pull/34681](https://github.com/discourse/discourse/pull/34681) 起，此功能已失效。

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2025 年11 月 16 日 21:15 UTC](https://meta.discourse.org/t/undeleting-replies-does-not-change-the-topics-bump-date/388501/2 "2025-11-16T21:15:28Z")

</div>

谢谢 @Moin，未来几周会有人处理。

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2026 年1 月 1 日 11:05 UTC](https://meta.discourse.org/t/undeleting-replies-does-not-change-the-topics-bump-date/388501/5 "2026-01-01T11:05:39Z")

</div>

这将通过以下方式修复：

> <https://github.com/discourse/discourse/pull/36935>
>
> 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

新年快乐 :tada:

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2026 年1 月 8 日 10:09 UTC](https://meta.discourse.org/t/undeleting-replies-does-not-change-the-topics-bump-date/388501/7 "2026-01-08T10:09:18Z")

</div>


