From bf3b144720fbe38666184f69182892ca4860c062 Mon Sep 17 00:00:00 2001 From: Tomahock Date: Wed, 29 May 2024 11:40:27 +0100 Subject: [PATCH] fix agif warnigns --- app/Http/Controllers/WarningsController.php | 2 +- app/Tools/NotificationTool.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/WarningsController.php b/app/Http/Controllers/WarningsController.php index 2a76ce5..3f5140d 100644 --- a/app/Http/Controllers/WarningsController.php +++ b/app/Http/Controllers/WarningsController.php @@ -59,7 +59,7 @@ public function addAgif(Request $request) $warning->text = $status; $warning->save(); - NotificationTool::sendWarningNotification($status); + NotificationTool::sendAllNotification($status); TwitterTool::tweet($status); TelegramTool::publish($status); diff --git a/app/Tools/NotificationTool.php b/app/Tools/NotificationTool.php index 229b323..73e94eb 100644 --- a/app/Tools/NotificationTool.php +++ b/app/Tools/NotificationTool.php @@ -199,6 +199,7 @@ public static function sendWarning($status, $topic) ], ]; + Log::debug(json_encode($headers)); $client = new \GuzzleHttp\Client(); $response = $client->request('POST', 'https://fcm.googleapis.com/fcm/send', $headers); @@ -301,7 +302,7 @@ public static function sendWarningNotification($status) self::sendWarning($status, $topic); } - public static function senAllNotification($status) + public static function sendAllNotification($status) { $topic = "all";