From 60a8af1c2d03ff30824bc447d0fec1f79015a83f Mon Sep 17 00:00:00 2001 From: Pavel Kirilin Date: Fri, 18 Sep 2026 11:35:49 +0200 Subject: [PATCH] Fixed notify all. Signed-off-by: Pavel Kirilin --- src/bot/handlers/basic/notify_all.rs | 6 ++++-- src/bot/main.rs | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) 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)