Recently, we faced an issue with the ratings plugin where stale/empty data was being passed to the webhooks. Turns out, the reason is that
DiscourseEvents are being relied on for enqueing the hooks.
This causes the webhook to be enqueued before some or all of the plugins run their modifications as we don’t have any mechanism to ensure what runs before/after what. Especially, The core code would take higher priority.
I’m proposing these webhooks be enqueued after the
DiscourseEvent.trigger call so that point, all plugins have run their modifications to the model.