|
|
|
@ -30,6 +30,7 @@ var CRLF = '\r\n',
|
|
|
|
|
RE_RES_NOOP = /^NOOP /i,
|
|
|
|
|
RE_CMD_FETCH = /^(?:UID )?FETCH/i,
|
|
|
|
|
RE_PARTID = /^(?:[\d]+[\.]{0,1})*[\d]+$/,
|
|
|
|
|
RE_ESCAPE = /\\\\/g,
|
|
|
|
|
//RE_ISPARTIAL = /<(\d+)>$/,
|
|
|
|
|
RE_DBLQ = /"/g,
|
|
|
|
|
RE_CMD = /^([^ ]+)(?: |$)/,
|
|
|
|
@ -334,6 +335,12 @@ ImapConnection.prototype.connect = function(loginCb) {
|
|
|
|
|
parsers.parseFetch(m.info, indata.literals, details);
|
|
|
|
|
details.seqno = parseInt(m.num, 10);
|
|
|
|
|
|
|
|
|
|
if (typeof details['x-gm-labels'] !== undefined) {
|
|
|
|
|
var labels = details['x-gm-labels'];
|
|
|
|
|
for (var i=0, len=labels.length; i<len; ++i)
|
|
|
|
|
labels[i] = labels[i].replace(RE_ESCAPE, '\\');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (isUnsolicited)
|
|
|
|
|
self.emit('msgupdate', details);
|
|
|
|
|
else {
|
|
|
|
|