Actions
Feature #12291
closedSupport for Slack notifications
Start date:
Due date:
% Done:
0%
Estimated time:
Plus Target Version:
22.01
Release Notes:
Default
Description
it would be nice to add Slack notifications
sample code:
function sendSlackMessage($message)
{
$ch = curl_init("https://slack.com/api/chat.postMessage");
$data = http_build_query([
"token" => "YOUR_API_TOKEN",
"channel" => '#random',
"text" => $message,
"username" => "John Doe",
]);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$result = curl_exec($ch);
curl_close($ch);
return $result;
}
Actions