no message
This commit is contained in:
1 parent
5f9f707c8e
commit
2b2d20fde7
62 files changed
+617
-212
No files matched your search
@@ -4,26 +4,19 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Http\Controllers\Api\TG;
|
||||
|
||||
use App\Models\Article;
|
||||
//use App\Models\Article;
|
||||
use App\Services\TomTool\Http;
|
||||
use App\Services\TG\Http as TGHttp;
|
||||
|
||||
final class HookController
|
||||
{
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
// $this->middleware('csrf')->except(['cmd']);
|
||||
// 或者 $this->middleware('csrf')->only(['specificMethod']);
|
||||
}
|
||||
|
||||
|
||||
public function cmd()
|
||||
{
|
||||
|
||||
try {
|
||||
|
||||
|
||||
$oTGHttp = new TGHttp();
|
||||
|
||||
$oTGHttp->sApiToken = env('telegram_token');
|
||||
$oTGHttp->sApiChatId = env('telegram_chatid');
|
||||
|
||||
@@ -31,7 +24,7 @@ final class HookController
|
||||
|
||||
$aUpdate = json_decode($sUpdate, true);
|
||||
|
||||
@file_put_contents('/www/_tg/bot_log.txt', json_encode($aUpdate, JSON_PRETTY_PRINT));
|
||||
// @file_put_contents('/www/_tg/bot_log.txt', json_encode($aUpdate, JSON_PRETTY_PRINT));
|
||||
|
||||
$aData['chatId'] = $aUpdate["message"]["chat"]["id"];
|
||||
$aData['fromId'] = $aUpdate["message"]["from"]["id"];
|
||||
|
||||
Reference in new issue
Block a user