mirror of
https://github.com/chatmail/core.git
synced 2026-04-24 08:56:29 +03:00
Look at From instead of Subject and ContentType in prefetch_should_download.
This commit is contained in:
@@ -1457,12 +1457,8 @@ pub(crate) async fn prefetch_should_download(
|
|||||||
let is_chat_message = headers.get_header_value(HeaderDef::ChatVersion).is_some();
|
let is_chat_message = headers.get_header_value(HeaderDef::ChatVersion).is_some();
|
||||||
let is_reply_to_chat_message = prefetch_is_reply_to_chat_message(context, &headers).await;
|
let is_reply_to_chat_message = prefetch_is_reply_to_chat_message(context, &headers).await;
|
||||||
|
|
||||||
let maybe_ndn = if let Some(subject) = headers.get_header_value(HeaderDef::Subject) {
|
let maybe_ndn = if let Some(from) = headers.get_header_value(HeaderDef::From_) {
|
||||||
subject.to_ascii_lowercase().contains("fail")
|
from.to_ascii_lowercase().contains("daemon")
|
||||||
} else {
|
|
||||||
false
|
|
||||||
} || if let Some(ctype) = headers.get_header_value(HeaderDef::ContentType) {
|
|
||||||
ctype.starts_with("multipart/report")
|
|
||||||
} else {
|
} else {
|
||||||
false
|
false
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user