From bfa0092026f66fc0577d9bb824c752a6ad631a89 Mon Sep 17 00:00:00 2001 From: efinst0rm Date: Tue, 24 Dec 2019 12:11:13 -0600 Subject: [PATCH] Fix for "Cannot send an empty message" --- notification_service.php | 1 + 1 file changed, 1 insertion(+) diff --git a/notification_service.php b/notification_service.php index 214c95d..4493b80 100644 --- a/notification_service.php +++ b/notification_service.php @@ -322,6 +322,7 @@ private function execute_discord_webhook($discord_webhook_url, $color, $message, // Use the CURL library to transmit the message via a POST operation to the webhook URL. $h = curl_init(); + curl_setopt($h, CURLOPT_HTTPHEADER, array('Content-type: application/json')); curl_setopt($h, CURLOPT_URL, $discord_webhook_url); curl_setopt($h, CURLOPT_POST, 1); curl_setopt($h, CURLOPT_POSTFIELDS, $post);