no message

This commit is contained in:
hellcat 2025-03-20 22:29:35 +08:00
parent ab8a2c2d8d
commit 5c7fc5d44f
2 changed files with 4 additions and 4 deletions

View File

@ -31,7 +31,7 @@ final class TestController extends BaseController
} }
$url = 'https://fuuu.cloud/api/tg/hook'; $url = 'https://fuc.loc/api/tg/hook';
$data = [ $data = [
'message' => [ 'message' => [
'chat' => [ 'chat' => [
@ -42,7 +42,7 @@ final class TestController extends BaseController
]; ];
$options = [ $options = [
'https' => [ 'http' => [
'header' => "Content-Type: application/json\r\n", 'header' => "Content-Type: application/json\r\n",
'method' => 'POST', 'method' => 'POST',
'content' => json_encode($data), 'content' => json_encode($data),

View File

@ -22,10 +22,10 @@ final class HookController
public function cmd() public function cmd()
{ {
$this->sApiToken = Config::obtain('telegram_token'); $this->sApiToken = Config::obtain('telegram_token');
$this->sApiChatId = Config::obtain('telegram_chatid') $this->sApiChatId = Config::obtain('telegram_chatid');
// 获取更新 // 获取更新
//$update = json_decode(file_get_contents("php://input"), true); @$update = json_decode(file_get_contents("php://input"), true);
$update = [ $update = [
'message' => [ 'message' => [