From a6bcc3f153895a4ce27425819cdc31769b6bd545 Mon Sep 17 00:00:00 2001 From: Tokumeikoi Date: Thu, 28 May 2020 16:10:43 +0800 Subject: [PATCH] fix --- app/Http/Controllers/Guest/TelegramController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Guest/TelegramController.php b/app/Http/Controllers/Guest/TelegramController.php index 8552c221..9b455687 100644 --- a/app/Http/Controllers/Guest/TelegramController.php +++ b/app/Http/Controllers/Guest/TelegramController.php @@ -39,9 +39,10 @@ class TelegramController extends Controller private function getMessage(array $data) { - if (!isset($data['message']['text'])) return false; + if (!isset($data['message'])) return false; $obj = new \StdClass(); $obj->is_private = $data['message']['chat']['type'] === 'private' ? true : false; + if (!isset($data['message']['text'])) return false; $text = explode(' ', $data['message']['text']); $obj->command = $text[0]; $obj->args = array_slice($text, 1);