From 7d22c436e7d5db15497198eaa224d6f100405b6d Mon Sep 17 00:00:00 2001 From: Andris Reinman Date: Thu, 8 Nov 2018 13:02:31 +0200 Subject: [PATCH] v1.10.5 --- lib/api/filters.js | 36 ++++++++++++------------------------ package.json | 8 ++++---- 2 files changed, 16 insertions(+), 28 deletions(-) diff --git a/lib/api/filters.js b/lib/api/filters.js index 39408597..5236acbf 100644 --- a/lib/api/filters.js +++ b/lib/api/filters.js @@ -1184,17 +1184,6 @@ function getFilterStrings(filter, mailboxes) { if (filter.query.size) { // let unit = 'B'; 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) { query.push(['larger', size /*+ unit*/]); } else if (filter.query.size < 0) { @@ -1218,6 +1207,18 @@ function getFilterStrings(filter, mailboxes) { } else { 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': if (filter.action[key]) { let target = mailboxes.find(mailbox => mailbox._id.toString() === filter.action[key].toString()); @@ -1245,19 +1246,6 @@ function getFilterStrings(filter, mailboxes) { ]; } 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; }) diff --git a/package.json b/package.json index 54e283f5..4157f79e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wildduck", - "version": "1.10.4", + "version": "1.10.5", "description": "IMAP/POP3 server built with Node.js and MongoDB", "main": "server.js", "scripts": { @@ -59,15 +59,15 @@ "mailsplit": "4.2.3", "mobileconfig": "2.1.0", "mongo-cursor-pagination": "7.1.0", - "mongodb": "3.1.8", + "mongodb": "3.1.9", "mongodb-extended-json": "1.10.0", "node-forge": "0.7.6", "nodemailer": "4.6.8", "npmlog": "4.1.2", - "openpgp": "4.1.2", + "openpgp": "4.2.1", "pem": "1.13.2", "pwnedpasswords": "1.0.4", - "qrcode": "1.3.0", + "qrcode": "1.3.2", "restify": "7.2.2", "restify-logger": "2.0.1", "seq-index": "1.1.0",