mirror of
https://github.com/nodemailer/wildduck.git
synced 2025-01-08 17:07:44 +08:00
v1.10.5
This commit is contained in:
parent
24229569e3
commit
7d22c436e7
2 changed files with 16 additions and 28 deletions
|
@ -1184,17 +1184,6 @@ function getFilterStrings(filter, mailboxes) {
|
||||||
if (filter.query.size) {
|
if (filter.query.size) {
|
||||||
// let unit = 'B';
|
// let unit = 'B';
|
||||||
let size = Math.abs(filter.query.size || 0);
|
let size = Math.abs(filter.query.size || 0);
|
||||||
/*
|
|
||||||
if (size) {
|
|
||||||
if (filter.query.size % (1024 * 1024) === 0) {
|
|
||||||
unit = 'MB';
|
|
||||||
size = Math.round(size / (1024 * 1024));
|
|
||||||
} else if (filter.query.size % 1024 === 0) {
|
|
||||||
unit = 'kB';
|
|
||||||
size = Math.round(size / 1024);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
if (filter.query.size > 0) {
|
if (filter.query.size > 0) {
|
||||||
query.push(['larger', size /*+ unit*/]);
|
query.push(['larger', size /*+ unit*/]);
|
||||||
} else if (filter.query.size < 0) {
|
} else if (filter.query.size < 0) {
|
||||||
|
@ -1218,6 +1207,18 @@ function getFilterStrings(filter, mailboxes) {
|
||||||
} else {
|
} else {
|
||||||
return ['do not flag it'];
|
return ['do not flag it'];
|
||||||
}
|
}
|
||||||
|
case 'spam':
|
||||||
|
if (filter.action[key]) {
|
||||||
|
return ['mark it as spam'];
|
||||||
|
} else {
|
||||||
|
return ['do not mark it as spam'];
|
||||||
|
}
|
||||||
|
case 'delete':
|
||||||
|
if (filter.action[key]) {
|
||||||
|
return ['delete it'];
|
||||||
|
} else {
|
||||||
|
return ['do not delete it'];
|
||||||
|
}
|
||||||
case 'mailbox':
|
case 'mailbox':
|
||||||
if (filter.action[key]) {
|
if (filter.action[key]) {
|
||||||
let target = mailboxes.find(mailbox => mailbox._id.toString() === filter.action[key].toString());
|
let target = mailboxes.find(mailbox => mailbox._id.toString() === filter.action[key].toString());
|
||||||
|
@ -1245,19 +1246,6 @@ function getFilterStrings(filter, mailboxes) {
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'spam':
|
|
||||||
if (filter.action[key] > 0) {
|
|
||||||
return ['mark it as spam'];
|
|
||||||
} else if (filter.action[key] < 0) {
|
|
||||||
return ['do not mark it as spam'];
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'delete':
|
|
||||||
if (filter.action[key]) {
|
|
||||||
return ['delete it'];
|
|
||||||
} else {
|
|
||||||
return ['do not delete it'];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "wildduck",
|
"name": "wildduck",
|
||||||
"version": "1.10.4",
|
"version": "1.10.5",
|
||||||
"description": "IMAP/POP3 server built with Node.js and MongoDB",
|
"description": "IMAP/POP3 server built with Node.js and MongoDB",
|
||||||
"main": "server.js",
|
"main": "server.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -59,15 +59,15 @@
|
||||||
"mailsplit": "4.2.3",
|
"mailsplit": "4.2.3",
|
||||||
"mobileconfig": "2.1.0",
|
"mobileconfig": "2.1.0",
|
||||||
"mongo-cursor-pagination": "7.1.0",
|
"mongo-cursor-pagination": "7.1.0",
|
||||||
"mongodb": "3.1.8",
|
"mongodb": "3.1.9",
|
||||||
"mongodb-extended-json": "1.10.0",
|
"mongodb-extended-json": "1.10.0",
|
||||||
"node-forge": "0.7.6",
|
"node-forge": "0.7.6",
|
||||||
"nodemailer": "4.6.8",
|
"nodemailer": "4.6.8",
|
||||||
"npmlog": "4.1.2",
|
"npmlog": "4.1.2",
|
||||||
"openpgp": "4.1.2",
|
"openpgp": "4.2.1",
|
||||||
"pem": "1.13.2",
|
"pem": "1.13.2",
|
||||||
"pwnedpasswords": "1.0.4",
|
"pwnedpasswords": "1.0.4",
|
||||||
"qrcode": "1.3.0",
|
"qrcode": "1.3.2",
|
||||||
"restify": "7.2.2",
|
"restify": "7.2.2",
|
||||||
"restify-logger": "2.0.1",
|
"restify-logger": "2.0.1",
|
||||||
"seq-index": "1.1.0",
|
"seq-index": "1.1.0",
|
||||||
|
|
Loading…
Reference in a new issue