There was an error while loading. Please reload this page.
1 parent a3e8771 commit 4bc5c6eCopy full SHA for 4bc5c6e
src/NotificationService.php
@@ -54,8 +54,24 @@ public static function sendSlackNotification($message)
54
return;
55
}
56
57
- // Prepare the data to be sent in the request body
58
- $data = ['text' => $message];
+ // Prepare the data for the request
+ $data = [
59
+ 'text' => config('log-alarm.notification_email_subject') ,
60
+ 'attachments' => [
61
+ [
62
+ 'title' => config('log-alarm.notification_email_subject'),
63
+ 'text' => $message,
64
+ 'color' => '#FF0000',
65
+ 'fields' => [
66
67
+ 'title' => 'Priority',
68
+ 'value' => 'High',
69
+ 'short' => true
70
+ ]
71
72
73
74
+ ];
75
76
// Initialize the cURL session
77
$ch = curl_init($webhookUrl);
0 commit comments