fix: mark holiday notice messages as bot-generated

This commit is contained in:
link2xt
2024-12-29 07:29:58 +00:00
committed by l
parent 1089aea8e0
commit 25933b10c8
3 changed files with 39 additions and 6 deletions

View File

@@ -621,7 +621,11 @@ pub(crate) async fn receive_imf_inner(
.await;
if let Some(is_bot) = mime_parser.is_bot {
from_id.mark_bot(context, is_bot).await?;
// If the message is auto-generated and was generated by Delta Chat,
// mark the contact as a bot.
if mime_parser.get_header(HeaderDef::ChatVersion).is_some() {
from_id.mark_bot(context, is_bot).await?;
}
}
Ok(Some(received_msg))