From 31f18586e2b06d9d14132e2ecf6d7f82e680dc8f Mon Sep 17 00:00:00 2001 From: hellcat <> Date: Tue, 17 Jun 2025 16:25:35 +0800 Subject: [PATCH] no message --- .../Controllers/Api/TG/HookController.php | 2 +- app/Services/TG/Http.php | 39 +++++++++++++++---- 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/app/Http/Controllers/Api/TG/HookController.php b/app/Http/Controllers/Api/TG/HookController.php index a5e750c..1798f95 100755 --- a/app/Http/Controllers/Api/TG/HookController.php +++ b/app/Http/Controllers/Api/TG/HookController.php @@ -87,7 +87,7 @@ final class HookController $oTGHttp->sendToTG($r, $mSendType); } - Http::response(200, 'ok'); + Http::response(200); } } else { diff --git a/app/Services/TG/Http.php b/app/Services/TG/Http.php index 3be2369..21e88ae 100644 --- a/app/Services/TG/Http.php +++ b/app/Services/TG/Http.php @@ -18,20 +18,43 @@ class Http { if ($mType == "dove") { + if (env("is_loc") == true) { + echo "
";
+ }
+
echo $sMsg;
- } else if (env('is_loc') == true) {
-
- echo "";
- echo($sMsg);
-
} else {
- $url = "https://api.telegram.org/bot$this->sApiToken/sendMessage?chat_id=$this->sApiChatId&text=" . urlencode($sMsg);
- file_get_contents($url);
-
+ if (env("is_loc") == true) {
+ echo "";
+ echo($sMsg);
+ } else {
+ $url = "https://api.telegram.org/bot$this->sApiToken/sendMessage?chat_id=$this->sApiChatId&text=" . urlencode($sMsg);
+ file_get_contents($url);
+ }
+
}
+
+
+
+// if ($mType == "dove") {
+//
+// echo $sMsg;
+//
+// } else if (env('is_loc') == true) {
+//
+// echo "";
+// echo($sMsg);
+//
+// } else {
+//
+// $url = "https://api.telegram.org/bot$this->sApiToken/sendMessage?chat_id=$this->sApiChatId&text=" . urlencode($sMsg);
+// file_get_contents($url);
+//
+// }
+
}
}