I am using webhooks as I’ve mentioned in other threads here.
I’ve noticed a bug however in this and I’d like to understand if its by design or other.
On our install we use moderator approval on posts if the TL is 2 or less. In my testing however I have noticed that with this feature enabled, the webhooks on post or topic actions do not fire 99.9% of the time.
The biggest confusion for me is a few randomly fire but the bulk majority do not. I could potentially wrap my head around all not going or all going but a few here or there going and the rest not is confusing me.
Can anyone think of a reason webhooks wouldn’t fire when we approve moderated posts? I’ve tried all variations including send me everything to no success.
I was testing this in my development environment yesterday. When a post is approved it is sending a Post Event webhook, when a topic is approved it is sending a Topic and a Post Event webhook. This is working consistently for me. Are you seeing any errors in the events list for the webhook?
Sorry for the delay, I went afk for the holidays. I am still able to replicate this. When I get a chance I will make a quick video in the hopes someone spots a mistake.
Basically nothing is being triggered after approving topic. I am seeing no errors in the events list for the webhook either.
As you can see below I have pretty much set it to send me everything though I have tried limiting to just topic and post actions as well.
When I checked today the last webhook event that executed since 12/22 was for a ping that I sent using the ping button. Though the site has been pretty active since then.
When I can I will create a video of this in action. In the hopes someone has an idea why they are missing.
Literally nothing, its almost as if they aren’t enabled but they definitely are. I can actually replicate this in my development and production environments.
I was thinking that the issue was the webhook not being sent after a post or topic is approved, but it sounds as though the issue is affecting all webhook events on your forum. What happens when a TL 3 user creates or edits a post? If you reset the moderator approval settings to their defaults, does the problem go away?
If a user of TL 3 or higher creates or edits a post a webhook is triggered immediately. If I reset moderator approval it does in fact go away. So it seems to be directly tied into topics that require approval.
Tests:
Tests were done with a moderation required level of 2 or less.
Test
Moderation Required
Successful
Create topic with TL > 3
No
Yes. Webhook successfully triggered.
Create Topic with TL < 3
Yes
Sporadically. This was strange but out of 10 runs 3 successfully triggered a webhook but the rest did not.
Reply to Topic with TL >= 3
No
Yes. Webhook successfully triggered.
Reply to Topic with TL < 3
Yes
No. No webhook is triggered.
Private Message (any TL)
No
Yes. Webhook successfully triggered.
Topic deleted
No
Yes. Webhook successfully triggered.
Topic edited TL >= 3
No
Yes. Webhook successfully triggered.
Topic edited TL <= 3
No
Yes. Webhook successfully triggered.
Videos:
Creating a topic with TL of 3 or higher.
2. Creating a topic with TL of 2 or less.
Replying with a topic of TL of 3 or higher
Replying with a topic of TL of 2 or less
EDIT: Not sure why my videos are being wonky but they work when you paste them directly.