update: fix telegram markdown

This commit is contained in:
tokumeikoi 2021-12-23 14:25:05 +08:00
parent 55357a1b0e
commit ce8b5dde28

View File

@ -17,7 +17,7 @@ class TelegramService {
public function sendMessage(int $chatId, string $text, string $parseMode = '') public function sendMessage(int $chatId, string $text, string $parseMode = '')
{ {
if ($parseMode === 'markdown') { if ($parseMode === 'markdown') {
$text = Markdown::parse($text); $text = str_replace('_', '\_', $text);
} }
$this->request('sendMessage', [ $this->request('sendMessage', [
'chat_id' => $chatId, 'chat_id' => $chatId,