|
|
@ -928,19 +928,14 @@ ImapConnection.prototype._fetch = function(which, uids, options, what, cb) {
|
|
|
|
|
|
|
|
|
|
|
|
var toFetch = '', prefix, extensions, self = this,
|
|
|
|
var toFetch = '', prefix, extensions, self = this,
|
|
|
|
parse = true, headers, key, stream,
|
|
|
|
parse = true, headers, key, stream,
|
|
|
|
opts = { markSeen: false, struct: true, size: false },
|
|
|
|
|
|
|
|
fetchers = {};
|
|
|
|
fetchers = {};
|
|
|
|
|
|
|
|
|
|
|
|
if (typeof what === 'function') {
|
|
|
|
if (typeof what === 'function') {
|
|
|
|
cb = what;
|
|
|
|
cb = what;
|
|
|
|
what = options;
|
|
|
|
what = options;
|
|
|
|
} else {
|
|
|
|
options = {};
|
|
|
|
if (options.markSeen)
|
|
|
|
|
|
|
|
opts.markSeen = true;
|
|
|
|
|
|
|
|
if (options.size)
|
|
|
|
|
|
|
|
opts.size = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
prefix = (opts.markSeen ? ' BODY.PEEK[' : ' BODY[');
|
|
|
|
prefix = (options.markSeen ? ' BODY.PEEK[' : ' BODY[');
|
|
|
|
if (!Array.isArray(what))
|
|
|
|
if (!Array.isArray(what))
|
|
|
|
what = [what];
|
|
|
|
what = [what];
|
|
|
|
for (var i = 0, wp, pprefix, len = what.length; i < len; ++i) {
|
|
|
|
for (var i = 0, wp, pprefix, len = what.length; i < len; ++i) {
|
|
|
|