Skip to content

Commit 5bab0d5

Browse files
authored
Merge pull request luolongfei#212 from HaneRo/main
Update TelegramBot.php
2 parents d76b829 + 30866cd commit 5bab0d5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

libs/MessageServices/TelegramBot.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ public function send(string $content, string $subject = '', int $type = 1, array
253253
$this->check($content, $data);
254254

255255
$commonFooter = '';
256-
256+
$notification = false;
257257
if ($type === 1 || $type === 4) {
258258
$this->setCommonFooter($commonFooter, "\n", false);
259259
} else if ($type === 2) {
@@ -262,6 +262,7 @@ public function send(string $content, string $subject = '', int $type = 1, array
262262
} else if ($type === 3) {
263263
$this->setCommonFooter($commonFooter);
264264
$content = $this->genDomainStatusFullMarkDownText($data['username'], $data['domainStatusArr']);
265+
$notification = true;
265266
} else {
266267
throw new \Exception(lang('100003'));
267268
}
@@ -306,7 +307,7 @@ public function send(string $content, string $subject = '', int $type = 1, array
306307
'text' => $content, // Text of the message to be sent, 1-4096 characters after entities parsing
307308
'parse_mode' => $isMarkdown ? 'MarkdownV2' : 'HTML',
308309
'disable_web_page_preview' => true,
309-
'disable_notification' => false
310+
'disable_notification' => $notification
310311
],
311312
]
312313
);

0 commit comments

Comments
 (0)