diff --git a/src/bot/handlers/basic/notify_all.rs b/src/bot/handlers/basic/notify_all.rs index 7b42364..f031ede 100644 --- a/src/bot/handlers/basic/notify_all.rs +++ b/src/bot/handlers/basic/notify_all.rs @@ -1,4 +1,4 @@ -use grammers_client::{types::Chat, Client, Update}; +use grammers_client::{types::Chat, Client, InputMessage, Update}; use crate::{bot::handlers::Handler, utils::messages::get_message}; @@ -24,7 +24,9 @@ impl Handler for NotifyAll { response.push_str(format!("@{username} ").as_str()); } } - message.reply(response).await?; + message + .reply(InputMessage::from(response).silent(true)) + .await?; Ok(()) } } diff --git a/src/bot/main.rs b/src/bot/main.rs index f4280af..6e45583 100644 --- a/src/bot/main.rs +++ b/src/bot/main.rs @@ -184,7 +184,10 @@ async fn run(args: BotConfig, client: Client) -> anyhow::Result<()> { .add_filter(ExcludedChatsFilter(args.excluded_chats.clone())) .add_filter(UpdateTypeFilter(&[UpdateType::New])) .add_filter(SilentFilter) - .add_filter(TextFilter(&["@all"], TextMatchMethod::Contains)) + .add_filter(TextFilter( + &["@all ", "@all,", "@all."], + TextMatchMethod::Contains, + )) .add_middleware::>(), // Time conversion utils FilteredHandler::new(TimeConverter)