From cc9dae28a9c081fd5f9ce2e9e44e5da96c3c10db Mon Sep 17 00:00:00 2001 From: hellcat <> Date: Sun, 13 Apr 2025 22:22:26 +0800 Subject: [PATCH] no message --- app/Services/TG/Hook/Base.php | 2 ++ app/Services/TG/Http.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Services/TG/Hook/Base.php b/app/Services/TG/Hook/Base.php index 259e25f..d8534b3 100644 --- a/app/Services/TG/Hook/Base.php +++ b/app/Services/TG/Hook/Base.php @@ -11,6 +11,8 @@ class Base { public function __construct() { $this->oHttp = new Http(); $this->oTGHttp = new TGHttp(); + $this->oTGHttp->sApiToken = env("telegram_token"); + $this->oTGHttp->sApiChatId = env("telegram_chatid"); } // protected function sendMessage($sText = '?') { diff --git a/app/Services/TG/Http.php b/app/Services/TG/Http.php index f92674d..741d974 100644 --- a/app/Services/TG/Http.php +++ b/app/Services/TG/Http.php @@ -14,7 +14,7 @@ class Http { echo "
";
             var_dump($sMsg);
         } else {
-            $url = "https://api.telegram.org/bot$this->sApiToken/sendMessage?chat_id=$this->sApiChatId&text=" . urlencode($sText);
+            $url = "https://api.telegram.org/bot$this->sApiToken/sendMessage?chat_id=$this->sApiChatId&text=" . urlencode($sMsg);
             file_get_contents($url);
         }