[update] TgBotNotice closed#123

This commit is contained in:
Lkeme 2021-10-03 23:40:23 +08:00
parent 1eb4b692db
commit 7871198933
2 changed files with 4 additions and 2 deletions

View File

@ -180,8 +180,9 @@ filter_words =
[notify.dingtalk]
token =
; Tele机器人|token|chatid|依赖USE_NOTIFY
; Tele机器人|url(可选)|token|chatid|依赖USE_NOTIFY
[notify.telegram]
url =
bottoken =
chatid =

View File

@ -189,7 +189,8 @@ class Notice
private static function teleSend(array $info)
{
Log::info('使用Tele机器人推送消息');
$url = 'https://api.telegram.org/bot' . getConf('bottoken', 'notify.telegram') . '/sendMessage';
$base_url = getConf('url', 'notify.telegram') ?: 'https://api.telegram.org/bot';
$url = $base_url . getConf('bottoken', 'notify.telegram') . '/sendMessage';
$payload = [
'chat_id' => getConf('chatid', 'notify.telegram'),
'text' => $info['content']