update: fix tg

This commit is contained in:
tokumeikoi 2021-08-07 19:00:33 +09:00
parent f2c7d092ac
commit dfa75f49bd

View File

@ -40,6 +40,7 @@ class TelegramService {
$curl->get($this->api . $method . '?' . http_build_query($params)); $curl->get($this->api . $method . '?' . http_build_query($params));
$response = $curl->response; $response = $curl->response;
$curl->close(); $curl->close();
if (!isset($response->ok)) abort(500, '请求失败');
if (!$response->ok) { if (!$response->ok) {
abort(500, '来自TG的错误' . $response->description); abort(500, '来自TG的错误' . $response->description);
} }