This commit is contained in:
Andris Reinman 2017-05-22 10:35:58 +03:00
parent 0bb380ac4c
commit acadf01a35
3 changed files with 14 additions and 3 deletions

View file

@ -1797,7 +1797,10 @@ function clearExpiredMessages() {
}).project({ }).project({
_id: true, _id: true,
mailbox: true, mailbox: true,
uid: true uid: true,
size: true,
map: true,
magic: true
}); });
let deleted = 0; let deleted = 0;

View file

@ -441,7 +441,15 @@ class MessageHandler {
if (options.message) { if (options.message) {
return next(null, options.message); return next(null, options.message);
} }
this.database.collection('messages').findOne(options.query, next); this.database.collection('messages').findOne(options.query, {
fields: {
mailbox: true,
uid: true,
size: true,
map: true,
magic: true
}
}, next);
}; };
getMessage((err, message) => { getMessage((err, message) => {

View file

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