# 修复：增益效果无法被多名用户标记

**URL:** <https://meta.discourse.org/t/fix-boosts-cant-be-flagged-by-multiple-users/407929>\
**Category:** Bug\
**Tags:** fixed\
**Created:** [2026年七月18日 02:21 UTC](https://meta.discourse.org/t/fix-boosts-cant-be-flagged-by-multiple-users/407929 "2026-07-18T02:21:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![small-lovely-cat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/small-lovely-cat/32/553546_2.png) [@small-lovely-cat](https://meta.discourse.org/u/small-lovely-cat)\
**Post date:** [2026年七月18日 02:21 UTC](https://meta.discourse.org/t/fix-boosts-cant-be-flagged-by-multiple-users/407929/1 "2026-07-18T02:21:49Z")

</div>

原始检查 `rs.reviewable_score_type == params.flag_type_id && rs.pending?` 防止已举报的点赞被多个用户重复举报。当用户尝试举报已举报的点赞时，会出现错误提示：`You have already flagged this boost.`

然而，这可能会让用户感到困惑，因为用户从未举报过它。

此提交移除了该检查，以便点赞可以被多个用户举报，从而解决此问题，同时添加了一些测试用例。

P.S.，对代码进行 lint 检查，以便 CI 不会报错。

 ![image](https://global.discourse-cdn.com/meta/original/4X/2/0/b/20b2af13cca01874e1d3f682b7f2cda52b8a725c.png)

> <https://github.com/discourse/discourse-boosts/pull/16>
>
> The original check \`rs.reviewable\_score\_type == params.flag\_type\_id && rs.pendin…g?\` prevents a flagged boost from being flagged by multiple users. When a user trying to flag a flagged boost, it will go wrong with an error message: \`You have already flagged this boost.\`
> 
> However, this may make the user confused, since the user has never flagged it.
> 
> This commit removed this check, so that the boost can be flagged by multiple users, so as to solve this problem, also added some specs.
> 
> P.S., updated linting for the .rb files.

---

<div class="post-metadata">

**Author:** ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)\
**Post date:** [2026年七月20日 07:51 UTC](https://meta.discourse.org/t/fix-boosts-cant-be-flagged-by-multiple-users/407929/3 "2026-07-20T07:51:46Z")

</div>

嗨，所以标题写错了吧？应该是“can’t”而不是“can”？

---

<div class="post-metadata">

**Author:** ![small-lovely-cat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/small-lovely-cat/32/553546_2.png) [@small-lovely-cat](https://meta.discourse.org/u/small-lovely-cat)\
**Post date:** [2026年七月20日 08:17 UTC](https://meta.discourse.org/t/fix-boosts-cant-be-flagged-by-multiple-users/407929/4 "2026-07-20T08:17:04Z")

</div>

是的，应该是 can’t，已经改过来了。

谢谢指出~

---

<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年七月20日 08:58 UTC](https://meta.discourse.org/t/fix-boosts-cant-be-flagged-by-multiple-users/407929/5 "2026-07-20T08:58:40Z")

</div>

谢谢 @small-lovely-cat 👍

我已审查 ✅ 并合并 :git_merged: 了你的 PR。

---

<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年七月20日 08:58 UTC](https://meta.discourse.org/t/fix-boosts-cant-be-flagged-by-multiple-users/407929/6 "2026-07-20T08:58:42Z")

</div>


