# 已标记帖子难以恢复（附原因）

**URL:** https://meta.discourse.org/t/flagged-post-difficult-to-restore-reason-given/401900
**Category:** Bug
**Created:** [2026年四月30日 08:06 UTC](https://meta.discourse.org/t/flagged-post-difficult-to-restore-reason-given/401900 "2026-04-30T08:06:17Z")
**Posts on this page:** 1
**Showing post:** 3

<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年五月21日 17:21 UTC](https://meta.discourse.org/t/flagged-post-difficult-to-restore-reason-given/401900/3 "2026-05-21T17:21:17Z")

</div>

好发现 @bksubhuti 👍 将通过以下链接修复

> <https://github.com/discourse/discourse/pull/40228>
>
> When a moderator disagreed with a flag on a hidden post, \`Post#unhide!\` re-ran \`…PostValidator\` against \`acting\_user\`, which defaults to the post's author. If the author had since lost trust (e.g. demoted to TL0) and the post's content exceeded new-user limits (embedded media, links, mentions, host spam), the update failed with \`ActiveRecord::RecordInvalid\` and the post stayed hidden.
> 
> Every other internal caller of \`Post#unhide!\` already sets \`acting\_user\` to whoever is performing the action so validations run against the staff member, not the original poster — \`PostsController#unhide\`, \`ReviewablePost#perform\_approve\_and\_unhide\`, \`ReviewableActionBuilder#perform\_unhide\_post\`, and \`PostActionDestroyer\`. \`ReviewableFlaggedPost#perform\_disagree\` was the lone exception.
> 
> Set \`post.acting\_user = performed\_by\` before calling \`post.unhide!\` to follow the established convention. The post content and ownership are untouched; this only affects which user the validator inspects during the update.
> 
> https://meta.discourse.org/t/401900

---

_[View the full topic](https://meta.discourse.org/t/flagged-post-difficult-to-restore-reason-given/401900)._
