Webhook for requires-moderation

We’d love to be able to get a webhook whenever a post requires approval. Right now, as I understand it, the webhook is only triggered when it’s approved. (If that’s not the intended behavior I can put together a bug report, but that seems to be what I’m observing).

It looks like https://github.com/discourse/discourse/commit/a16b616861ec25f28f05bb18d48ed111e56a7b0f added the ability to get webhooks for flag events (including creation), but unless I’m confused (always possible!) flagging != requires approval.

The use case is that we have some words in our Watched Words list that trigger Require Approval. I’d like to add a Slack notification to our moderators for those cases.

The discourse-chat-integration plugin doesn’t seem to have a trigger for this specific use case, which seems reasonable, and I’m happy to do the Slack-pinging part myself… I just need a webhook to trigger it from.

It’s basically an extension of Is there a webhook for flag raised or mod inbox++? to account for Requires Approval in addition to flagging.

4 Likes

Seems like a reasonable request, what do you think @vinothkannans?

1 Like

Yes it have good use case. Added to my list :memo:

3 Likes

PR created

https://github.com/discourse/discourse/pull/6175

P.S. It’s merged now.

10 Likes