This commit is contained in:
Andris Reinman 2020-09-17 12:36:20 +03:00
parent 1ae683792f
commit 2fc89c0ecc
3 changed files with 12 additions and 4 deletions

View file

@ -180,7 +180,11 @@ async function copyHandler(server, messageHandler, connection, mailbox, update,
messageData.rdate = Date.now() + (targetData.retention || 0);
messageData.modseq = modifyIndex; // reset message modseq to whatever it is for the mailbox right now
messageData.searchable = true;
if (!message.flags.includes('\\Deleted')) {
messageData.searchable = true;
} else {
delete messageData.searchable;
}
let junk = false;
if (targetData.specialUse === '\\Junk' && !messageData.junk) {

View file

@ -415,7 +415,7 @@ class MessageHandler {
messageData.uid = mailboxData.uidNext;
messageData.modseq = mailboxData.modifyIndex + 1;
if (!['\\Junk', '\\Trash'].includes(mailboxData.specialUse) && !flags.includes('\\Deleted')) {
if (!flags.includes('\\Deleted')) {
messageData.searchable = true;
}
@ -862,7 +862,11 @@ class MessageHandler {
let unseen = message.unseen;
message.searchable = true;
if (!message.flags.includes('\\Deleted')) {
messageData.searchable = true;
} else {
delete messageData.searchable;
}
let junk = false;
if (targetData.specialUse === '\\Junk' && !message.junk) {

View file

@ -1,6 +1,6 @@
{
"name": "wildduck",
"version": "1.29.0",
"version": "1.29.1",
"description": "IMAP/POP3 server built with Node.js and MongoDB",
"main": "server.js",
"scripts": {