# 使用 Webhooks “Reviewable Event”时丢失事件

**URL:** https://meta.discourse.org/t/missing-events-when-using-webhooks-reviewable-event/173938
**Category:** Bug
**Created:** [2020年十二月21日 17:20 UTC](https://meta.discourse.org/t/missing-events-when-using-webhooks-reviewable-event/173938 "2020-12-21T17:20:05Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Fares\_Droubi1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fares_droubi1/32/193803_2.png) [@Fares\_Droubi1](https://meta.discourse.org/u/Fares_Droubi1)
#### Post date: [2020年十二月21日 17:20 UTC](https://meta.discourse.org/t/missing-events-when-using-webhooks-reviewable-event/173938/1 "2020-12-21T17:20:05Z")

</div>

你好，

我们正在基于 Discourse API 构建一个云函数，利用“可审查事件（Reviewable Event）”类型的 Webhook 来自动处理被标记的议题并创建工单。

当有人标记某个议题时，我们会收到一个“可审查事件”。

 ![Screenshot 2020-12-21 at 18.08.55](https://global.discourse-cdn.com/meta/original/3X/e/3/e3dd3abcd28a30a7a9ce7fa72e58934b19027a2a.png)

 ![Screenshot 2020-12-21 at 18.16.29](https://global.discourse-cdn.com/meta/original/3X/6/b/6b13ea396a248c2279ea2d7544e13270d7e6e3c5.png)

但当其他用户标记同一议题时，我们却收不到任何“可审查事件”的负载数据。

另外，似乎每个用户创建标记的数量是有限制的，即特定用户无法对同一议题进行多次标记。如果第一次标记已被接受，是否有办法通过 API 重置这些标记？

特此告知 @Phil_Snow

此致，  
Fares

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [2020年十二月21日 17:43 UTC](https://meta.discourse.org/t/missing-events-when-using-webhooks-reviewable-event/173938/2 "2020-12-21T17:43:17Z")

</div>

> [@Fares\_Droubi1](#):
>
> 意思是特定用户不能对同一个主题多次标记。

这里的“主题”具体指什么？是指对同一个主题或同一篇帖子进行重复标记会触发此限制吗？

---

<div class="post-metadata">

### Author: ![Fares\_Droubi1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fares_droubi1/32/193803_2.png) [@Fares\_Droubi1](https://meta.discourse.org/u/Fares_Droubi1)
#### Post date: [2020年十二月21日 17:50 UTC](https://meta.discourse.org/t/missing-events-when-using-webhooks-reviewable-event/173938/3 "2020-12-21T17:50:06Z")

</div>

是的，我的意思是，即使用户的话题已被批准，同一用户再次对同一话题进行标记。

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [2020年十二月21日 17:53 UTC](https://meta.discourse.org/t/missing-events-when-using-webhooks-reviewable-event/173938/4 "2020-12-21T17:53:25Z")

</div>

同一个用户重复标记两次也会被处理吗？

---

<div class="post-metadata">

### Author: ![Fares\_Droubi1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fares_droubi1/32/193803_2.png) [@Fares\_Droubi1](https://meta.discourse.org/u/Fares_Droubi1)
#### Post date: [2020年十二月21日 17:59 UTC](https://meta.discourse.org/t/missing-events-when-using-webhooks-reviewable-event/173938/5 "2020-12-21T17:59:56Z")

</div>

以下是复现步骤：

- 用户 A 标记主题 1
- 一名版主接受并保留该帖子，或选择忽略
- 用户 A 尝试再次标记主题 1，但收到如下提示  
 ![Screenshot 2020-12-21 at 18.58.44](https://global.discourse-cdn.com/meta/original/3X/0/6/06c80d4d04fc287e4498c752bfe4a07e92032de2.png)

希望这能有所帮助。

另外，关于之前提到的缺失事件的问题，情况如何？

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [2020年十二月21日 18:08 UTC](https://meta.discourse.org/t/missing-events-when-using-webhooks-reviewable-event/173938/6 "2020-12-21T18:08:38Z")

</div>

今年我们新增了一项功能，因此对已审核的帖子进行标记会被阻止：

> <https://github.com/discourse/discourse/commit/fadb2b7157d744226c85eccba92af1cbd2924c43>

可以通过设置“再次标记前的冷却小时数”（cooldown hours until reflag）进行调整 @Fares_Droubi1。

不过，错误提示有误……我们是否在此处出现了回归？@Roman / @featheredtoast？

---

<div class="post-metadata">

### Author: ![featheredtoast](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/featheredtoast/32/116994_2.png) [@featheredtoast](https://meta.discourse.org/u/featheredtoast)
#### Post date: [2020年十二月21日 18:12 UTC](https://meta.discourse.org/t/missing-events-when-using-webhooks-reviewable-event/173938/7 "2020-12-21T18:12:46Z")

</div>

看起来是这样。

至于没有看到第二个“可审查项目已创建”事件，那是因为针对同一帖子再次举报时不会创建新的项目——它们会被合并到同一个“可审查项目”下。这会影响分数计算，但所有单独的举报都由同一个可审查项目处理。
