Implementing webhooks for the Calendar plugin

I dug into the code and I found that’s not as easy as it should to add new webhooks.

  • Webhooks are part of a group of webhooks (I guess it’s for the admin and/or to namespace events)
  • For the Solved plugin, there are 2 webhooks: solved_accepted_solution and solved_unaccepted_solution, in the solved group

Where it goes wrong is:

  • the solved group is hardcoded in the WebHookEventType model of Discourse
  • the two events are also hardcoded in the WebHookEventType model of Discourse

I’ll see if and how I can manage to still declare new events without to have to touch to the Discourse code…

1 Like