mirror of
https://github.com/chatmail/core.git
synced 2026-05-06 16:36:59 +03:00
Create entries in msgs table for MDNs
At least one entry is required for DeleteMsgOnImap job. Additionally, adding a hidden entry makes it possible to avoid redownloading the message if it gets a new UID on the server.
This commit is contained in:
@@ -624,10 +624,13 @@ fn add_parts(
|
||||
let subject = mime_parser.get_subject().unwrap_or_default();
|
||||
|
||||
for part in mime_parser.parts.iter_mut() {
|
||||
if mime_parser.location_kml.is_some()
|
||||
let is_mdn = !mime_parser.reports.is_empty();
|
||||
|
||||
let is_location_kml = mime_parser.location_kml.is_some()
|
||||
&& icnt == 1
|
||||
&& (part.msg == "-location-" || part.msg.is_empty())
|
||||
{
|
||||
&& (part.msg == "-location-" || part.msg.is_empty());
|
||||
|
||||
if is_mdn || is_location_kml {
|
||||
*hidden = true;
|
||||
if state == MessageState::InFresh {
|
||||
state = MessageState::InNoticed;
|
||||
|
||||
Reference in New Issue
Block a user