From cf4c759df99731ecc31faba128fa64faa0d48306 Mon Sep 17 00:00:00 2001 From: link2xt Date: Thu, 18 Jun 2026 05:07:02 +0200 Subject: [PATCH] fix: do not put locations into pre-messages --- src/mimefactory.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/mimefactory.rs b/src/mimefactory.rs index e835f7a5f..3ee7f3592 100644 --- a/src/mimefactory.rs +++ b/src/mimefactory.rs @@ -1769,11 +1769,14 @@ impl MimeFactory { } } - if let Some(msg_kml_part) = self.get_message_kml_part() { + if !matches!(self.pre_message_mode, PreMessageMode::Pre { .. }) + && let Some(msg_kml_part) = self.get_message_kml_part() + { parts.push(msg_kml_part); } - if location::is_sending_to_chat(context, msg.chat_id).await? + if !matches!(self.pre_message_mode, PreMessageMode::Pre { .. }) + && location::is_sending_to_chat(context, msg.chat_id).await? && let Some((part, timestamp)) = self.get_location_kml_part(context).await? { parts.push(part);