Hi everyone,
In order to make webhooks work easily with Slack, i have added this line of code in ‘modules/Cockpit/webhooks.php’
Slack payload expect a text attribute otherwise it send a http 400
$data = json_encode([
'event' => $evt,
'hook' => $webhook['name'],
'backend' => COCKPIT_ADMIN,
'args' => func_get_args(),
'text' => $webhook['name']
]);
Feel free to change the implementation if you guys thinks it is great idea.
What would be nice is to have a list of attributes/values added in the webhooks setting so we could add attributes dynamically.
Thanks