Delete outgoing MDNs detected in the Sent folder

Gmail saves all outgoing messages to the Sent folder,
including MDNs. Delete MDNs sent by Delta Chat immediately
to keep DeltaChat or INBOX clean.
This commit is contained in:
link2xt
2022-05-29 17:14:07 +00:00
parent 3b63d40352
commit 62b50c87d4
2 changed files with 8 additions and 0 deletions

View File

@@ -4,6 +4,7 @@
### Changes
- refactorings #3373
- delete outgoing MDNs found in the Sent folder on Gmail #3372
## 1.84.0

View File

@@ -1174,6 +1174,13 @@ INSERT INTO msgs
}
}
if !incoming && is_mdn && is_dc_message == MessengerMessage::Yes {
// Normally outgoing MDNs sent by us never appear in mailboxes, but Gmail saves all
// outgoing messages, including MDNs, to the Sent folder. If we detect such saved MDN,
// delete it.
needs_delete_job = true;
}
Ok(ReceivedMsg {
chat_id,
state,