Skip to content

Commit

Permalink
master - update slack notification message shape
Browse files Browse the repository at this point in the history
  • Loading branch information
dani committed Jul 10, 2024
1 parent a3e8771 commit 4bc5c6e
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions src/NotificationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,24 @@ public static function sendSlackNotification($message)
return;
}

// Prepare the data to be sent in the request body
$data = ['text' => $message];
// Prepare the data for the request
$data = [
'text' => config('log-alarm.notification_email_subject') ,
'attachments' => [
[
'title' => config('log-alarm.notification_email_subject'),
'text' => $message,
'color' => '#FF0000',
'fields' => [
[
'title' => 'Priority',
'value' => 'High',
'short' => true
]
]
]
]
];

// Initialize the cURL session
$ch = curl_init($webhookUrl);
Expand Down

0 comments on commit 4bc5c6e

Please sign in to comment.