|
|
@@ -40,13 +40,20 @@ class TelegramWebHook extends BaseController
|
|
|
|
|
|
public function handle(Request $request): JsonResponse
|
|
|
{
|
|
|
-// Log::error('Telegram 日志写入测试: ' . json_encode([$request->ip()], JSON_UNESCAPED_UNICODE));
|
|
|
+ Log::error('Telegram 日志写入测试: ' . json_encode([$request->ip()], JSON_UNESCAPED_UNICODE));
|
|
|
|
|
|
try {
|
|
|
$telegram = new Api(config('services.telegram.token'));
|
|
|
} catch (TelegramSDKException $e) {
|
|
|
return response()->json(['status' => 'ok']);
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
try {
|
|
|
$update = $telegram->getWebhookUpdate(); // 获取更新数据
|
|
|
$update->callbackQuery;
|