diff --git a/lib/Connection.js b/lib/Connection.js index ebcbc5f..a89661f 100644 --- a/lib/Connection.js +++ b/lib/Connection.js @@ -23,6 +23,7 @@ var MAX_INT = 9007199254740992, 'ENVELOPE': 'envelope', 'INTERNALDATE': 'date' }, + SPECIAL_USE_ATTRIBUTES = ['\\All', '\\Archive', '\\Drafts', '\\Flagged', '\\Junk', '\\Sent', '\\Trash'], CRLF = '\r\n', RE_CMD = /^([^ ]+)(?: |$)/, RE_UIDCMD_HASRESULTS = /^UID (?:FETCH|SEARCH|SORT)/, @@ -1233,6 +1234,10 @@ Connection.prototype._resUntagged = function(info) { parent: null }; + for (var i = 0, len = SPECIAL_USE_ATTRIBUTES.length; i < len; ++i) + if (box['attribs'].indexOf(SPECIAL_USE_ATTRIBUTES[i]) > -1) + box['special_use_attrib'] = SPECIAL_USE_ATTRIBUTES[i]; + var name = info.text.name, curChildren = this._curReq.cbargs[0];