يتم تشغيل webhook بعد مرتين عند تعديل المنشور لأول منشور في موضوع

First, it fires an event without any changes in the payload (thus the post as it is now) and then a second one with the changes.

This applies only for changes to the first post in a topic.

Expected: Only fire one event, with a payload containing the changed post.

Or is this working as intended? If so, that’s confusing for the receiving endpoint as a change is signaled, but the payload contains no changes at all and you can’t figure out if this is a bogus change event or not (as no info is given in the payload).

It works as intended on post_created and for changes to subsequent posts in a topic, only one event.

Anybody? This drives me crazy working with the post webhook for first posts.

إعجابَين (2)

I am not sure if this is intentional or not, @vinothkannans do you know ?

إعجاب واحد (1)

It’s at least confusing for the received endpoint, as there is no single use case for it. Should be one event, not two.

I fixed this issue in below PR. Since it’s changing the way how the topic web hooks are triggered I have to make sure the change again before merging it.

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

3 إعجابات

Awesome, thanks @vinothkannans, our post webhook endpoint will love this :+1:t2:

إعجاب واحد (1)