|
|
|
@ -644,7 +644,9 @@ Connection.prototype._fetch = function(which, uids, options) {
|
|
|
|
|
validateUIDList(uids);
|
|
|
|
|
uids = uids.join(',');
|
|
|
|
|
|
|
|
|
|
var cmd = which + 'FETCH ' + uids + ' (', fetching = [];
|
|
|
|
|
var cmd = which + 'FETCH ' + uids + ' (',
|
|
|
|
|
fetching = [],
|
|
|
|
|
i, len, key;
|
|
|
|
|
|
|
|
|
|
if (this.serverSupports('X-GM-EXT-1')) {
|
|
|
|
|
fetching.push('X-GM-THRID');
|
|
|
|
@ -669,7 +671,7 @@ Connection.prototype._fetch = function(which, uids, options) {
|
|
|
|
|
prefix = (options.markSeen ? '' : '.PEEK');
|
|
|
|
|
if (!Array.isArray(bodies))
|
|
|
|
|
bodies = [bodies];
|
|
|
|
|
for (var i = 0, len = bodies.length; i < len; ++i) {
|
|
|
|
|
for (i = 0, len = bodies.length; i < len; ++i) {
|
|
|
|
|
fetching.push('BODY[' + bodies[i] + ']');
|
|
|
|
|
cmd += ' BODY' + prefix + '[' + bodies[i] + ']';
|
|
|
|
|
}
|
|
|
|
@ -682,7 +684,7 @@ Connection.prototype._fetch = function(which, uids, options) {
|
|
|
|
|
var modifiers = options.modifiers,
|
|
|
|
|
modkeys = (typeof modifiers === 'object' ? Object.keys(modifiers) : []),
|
|
|
|
|
modstr = ' (';
|
|
|
|
|
for (var i = 0, len = modkeys.length, key; i < len; ++i) {
|
|
|
|
|
for (i = 0, len = modkeys.length, key; i < len; ++i) {
|
|
|
|
|
key = modkeys[i].toUpperCase();
|
|
|
|
|
if (key === 'CHANGEDSINCE' && this.serverSupports('CONDSTORE'))
|
|
|
|
|
modstr += key + ' ' + modifiers[modkeys[i]] + ' ';
|
|
|
|
|