Comparing version 1.0.43 to 1.0.44
# CHANGELOG | ||
- 1.0.44 - 2020-04-20 | ||
- Better detcting of special use mailboxes | ||
- 1.0.43 - 2020-04-20 | ||
@@ -4,0 +8,0 @@ |
@@ -124,2 +124,4 @@ 'use strict'; | ||
} else { | ||
// ignore non-listed folders | ||
/* | ||
let specialUseFlag = specialUse(connection.capabilities.has('XLIST') || connection.capabilities.has('SPECIAL-USE'), entry); | ||
@@ -130,2 +132,3 @@ if (specialUseFlag && !flagsSeen.has(specialUseFlag)) { | ||
entries.push(entry); | ||
*/ | ||
} | ||
@@ -143,2 +146,15 @@ } | ||
['\\Drafts', '\\Junk', '\\Sent', '\\Trash'].forEach(specialUseFlag => { | ||
// try to ensure that we have most needed special use mailboxes detected | ||
if (entries.find(entry => entry.specialUse === specialUseFlag)) { | ||
return; | ||
} | ||
// special use mailbox not found? try again | ||
let match = entries.find(entry => !entry.specialUse && specialUse(false, entry) === specialUseFlag); | ||
if (match) { | ||
match.specialUse = specialUseFlag; | ||
} | ||
}); | ||
return entries; | ||
@@ -145,0 +161,0 @@ } catch (err) { |
{ | ||
"name": "imapflow", | ||
"version": "1.0.43", | ||
"version": "1.0.44", | ||
"description": "IMAP Client for Node", | ||
@@ -5,0 +5,0 @@ "main": "./lib/imap-flow.js", |
517663
10848