Comparing version 1.0.102 to 1.0.103
@@ -45,9 +45,9 @@ 'use strict'; | ||
if (listCommand === 'LIST' && connection.capabilities.has('LIST-STATUS') && statusQueryAttributes.length) { | ||
returnArgs.push({ type: 'ATOM', value: 'STATUS' }, statusQueryAttributes); | ||
} | ||
let runList = async (reference, mailbox) => { | ||
const cmdArgs = [encodePath(connection, reference), encodePath(connection, mailbox)]; | ||
if (listCommand === 'LIST' && connection.capabilities.has('LIST-STATUS') && statusQueryAttributes.length) { | ||
returnArgs.push({ type: 'ATOM', value: 'STATUS' }, statusQueryAttributes); | ||
} | ||
if (returnArgs.length) { | ||
@@ -169,2 +169,11 @@ cmdArgs.push({ type: 'ATOM', value: 'RETURN' }, returnArgs); | ||
if (options.listOnly) { | ||
return entries; | ||
} | ||
if (normalizedReference && !entries.find(entry => entry.specialUse === '\\Inbox')) { | ||
// INBOX was most probably not included in the listing if namespace was used | ||
await runList('', 'INBOX'); | ||
} | ||
if (options.statusQuery) { | ||
@@ -187,11 +196,2 @@ for (let entry of entries) { | ||
if (options.listOnly) { | ||
return entries; | ||
} | ||
if (normalizedReference && !entries.find(entry => entry.specialUse === '\\Inbox')) { | ||
// INBOX was most probably not included in the listing if namespace was used | ||
await runList('', 'INBOX'); | ||
} | ||
response = await connection.exec( | ||
@@ -198,0 +198,0 @@ 'LSUB', |
{ | ||
"name": "imapflow", | ||
"version": "1.0.102", | ||
"version": "1.0.103", | ||
"description": "IMAP Client for Node", | ||
@@ -5,0 +5,0 @@ "main": "./lib/imap-flow.js", |
529426