update telegram

This commit is contained in:
Tokumeikoi 2020-05-20 18:33:54 +08:00
parent c5b56da958
commit 71c42765fc

View File

@ -51,6 +51,9 @@ class TelegramController extends Controller
{ {
$msg = $this->msg; $msg = $this->msg;
if (!$msg->is_private) return; if (!$msg->is_private) return;
if (!isset($msg->args[0])) {
abort(500, '参数有误,请携带订阅地址发送');
}
$subscribeUrl = $msg->args[0]; $subscribeUrl = $msg->args[0];
$subscribeUrl = parse_url($subscribeUrl); $subscribeUrl = parse_url($subscribeUrl);
parse_str($subscribeUrl['query'], $query); parse_str($subscribeUrl['query'], $query);