This commit is contained in:
Andris Reinman 2020-09-18 10:13:35 +03:00
parent 2557599c63
commit 2d591dd126
3 changed files with 8 additions and 1 deletions

View file

@ -627,6 +627,12 @@ class Indexer {
return callback(err); return callback(err);
} }
mimeTree.attachmentMap[node.attachmentId] = id; mimeTree.attachmentMap[node.attachmentId] = id;
let attachmentInfo = mimeTree.attachments.find(a => a.id === node.attachmentId);
if (attachmentInfo && node.body) {
attachmentInfo.size = node.body.length;
}
return storeNode(); return storeNode();
}); });
}; };

View file

@ -671,6 +671,7 @@ class FilterHandler {
userData, userData,
response: err, response: err,
filterResults, filterResults,
attachments: (maildata && maildata.attachments) || [],
error: err error: err
}, },
prepared: prepared:

View file

@ -1,6 +1,6 @@
{ {
"name": "wildduck", "name": "wildduck",
"version": "1.29.2", "version": "1.29.3",
"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": {