From 85398a6e84f1e6981e2c77dd8123f6c1bbfab58a Mon Sep 17 00:00:00 2001 From: senset Date: Wed, 29 Jun 2022 12:52:45 +0800 Subject: [PATCH] fix bug --- src/telegram_bot.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/telegram_bot.rs b/src/telegram_bot.rs index 96ec9f8..37eeac8 100644 --- a/src/telegram_bot.rs +++ b/src/telegram_bot.rs @@ -7,7 +7,7 @@ use crate::{commands::CommandHandler, commands::Commands, config::Args}; use migration::DbErr; use strfmt::Format; -use teloxide::utils::command::BotCommands; +use teloxide::utils::{command::BotCommands, markdown::escape}; use teloxide::{ prelude::*, types::ForwardedFrom, types::InlineQueryResult, types::InlineQueryResultArticle, types::InputMessageContent, types::InputMessageContentText, types::ParseMode, @@ -182,7 +182,7 @@ impl BotServer { message_text: format!( "*{}*: {}", username.trim_start_matches("@"), - record.message + escape(&record.message) ), parse_mode: Some(ParseMode::MarkdownV2), entities: None,