mirror of
https://github.com/chatmail/core.git
synced 2026-05-09 09:56:31 +03:00
fix: remove Config::DeleteToTrash and Config::ConfiguredTrashFolder
`delete_to_trash` is an option that was added for Gmail as Gmail archives the messages by default when they are deleted over IMAP: <https://github.com/chatmail/core/issues/3957> (implemented in <https://github.com/chatmail/core/pull/3972>). Closes <https://github.com/chatmail/core/issues/6444>.
This commit is contained in:
@@ -1762,12 +1762,11 @@ pub async fn delete_msgs_ex(
|
||||
modified_chat_ids.insert(msg.chat_id);
|
||||
deleted_rfc724_mid.push(msg.rfc724_mid.clone());
|
||||
|
||||
let target = context.get_delete_msgs_target().await?;
|
||||
let update_db = |trans: &mut rusqlite::Transaction| {
|
||||
let mut stmt = trans.prepare("UPDATE imap SET target=? WHERE rfc724_mid=?")?;
|
||||
stmt.execute((&target, &msg.rfc724_mid))?;
|
||||
let mut stmt = trans.prepare("UPDATE imap SET target='' WHERE rfc724_mid=?")?;
|
||||
stmt.execute((&msg.rfc724_mid,))?;
|
||||
if !msg.pre_rfc724_mid.is_empty() {
|
||||
stmt.execute((&target, &msg.pre_rfc724_mid))?;
|
||||
stmt.execute((&msg.pre_rfc724_mid,))?;
|
||||
}
|
||||
trans.execute("DELETE FROM smtp WHERE msg_id=?", (msg_id,))?;
|
||||
trans.execute(
|
||||
|
||||
Reference in New Issue
Block a user