I’m integrating with the webhook, and when I receive a
Post event, we have the
post_type field. How can I find the type list? Do we have documentation about webhook events?
In resume, I wondering to discover if the user made a comment, shared a post, or another related event.
Maybe this should be documented here: Configure webhooks that trigger on Discourse events to integrate with external services.
You can get the post types from the rails console by running
Post.types. That returns
:regular=>1, :moderator_action=>2, :small_action=>3, :whisper=>4
Any regular post on the site will have its
post_type field set to 1 (regular.)
Post type 2 (moderator_actions) is for posts that are generated when moderators handle flags in the review queue. I think that’s the only time that post type is used.
Post type 3 (small_actions) is for posts that are automatically generated when a topic is opened, closed, etc.
Post type 4 is for whisper posts.
Is there some way to know if the user created a post or just reply another post?
And do we have the event when the user shares a topic/post?