do not read extra info for fetch

This commit is contained in:
Andris Reinman 2020-01-29 15:38:15 +02:00
parent b7ed286bf7
commit 1676c7336f
No known key found for this signature in database
GPG key ID: 5388A30A31834D83
2 changed files with 19 additions and 6 deletions

View file

@ -50,9 +50,10 @@ module.exports = {
let flagsExist = false;
let uidExist = false;
let modseqExist = false;
let bodystructureExist = true;
let rfc822sizeExist = true;
let envelopeExist = true;
let bodystructureExist = false;
let rfc822sizeExist = false;
let idateExist = false;
let envelopeExist = false;
let markAsSeen = false;
let metadataOnly = true;
let changedSince = 0;
@ -130,6 +131,10 @@ module.exports = {
envelopeExist = true;
}
if (param.value.toUpperCase() === 'INTERNALDATE') {
idateExist = true;
}
if (!this.selected.readOnly) {
if (param.value.toUpperCase() === 'BODY' && param.section) {
// BODY[...]
@ -279,6 +284,8 @@ module.exports = {
bodystructureExist,
rfc822sizeExist,
envelopeExist,
flagsExist,
idateExist,
metadataOnly: !!metadataOnly,
markAsSeen: !!markAsSeen,
messages,

View file

@ -53,11 +53,17 @@ module.exports = (server, messageHandler, userCache) => (mailbox, options, sessi
let projection = {
_id: true,
uid: true,
modseq: true,
idate: true,
flags: true
modseq: true
};
if (options.flagsExist) {
projection.flags = true;
}
if (options.idateExist) {
projection.idate = true;
}
if (options.bodystructureExist) {
projection.bodystructure = true;
}