Missing events when using Webhooks "Reviewable Event"

Hi,

We are building a cloud function based on discourse API using the Webhooks using “Reviewable Event” to automate opening issues when flagged.

So when somebody Flag a Topic then we get a reviewable event.

Screenshot 2020-12-21 at 18.08.55

Screenshot 2020-12-21 at 18.16.29

But when another user Flag it, we don’t get any event “Reviewable Event” payload.

Also, It seems there is a limit in creating Flags per user, meaning a particular user can’t flag a topic more than once, when if the First Flag has been accepted, is there a way to reset those Flags using the API?
FYI @Phil_Snow

Best,
Fares

What do you mean by “thread” here? Is it flagging the same topic or the same post twice that triggers this?

Yes, I mean Flagging the same topic by the same user even after been approved.

Is it being flagged by the same user twice too?

Here is the steps to repoduce,

Hope that this helps,

And also what about the first question about the missing event?

We added a feature this years so flagging an already reviewed post is blocked:

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

It can be tweaked with the setting cooldown hours until reflag @Fares_Droubi1.

However the error message is wrong… Did we regress here @Roman_Rizzi / @featheredtoast ?

1 Like

Looks like it.

As for not seeing the second “reviewable created” event, that is because there is no additional item created for more flags against the same post - they’re bundled under the same “reviewable” item. This will affect score calculations, but all individual flags are are handled by the same reviewable.

1 Like