fix: do not put locations into pre-messages

This commit is contained in:
link2xt
2026-07-01 12:02:53 +00:00
committed by l
parent 5eb5d22d7b
commit 30bdcd6809
+5 -2
View File
@@ -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);