Comparing version 1.0.161 to 1.0.162
# Changelog | ||
## [1.0.162](https://github.com/postalsys/imapflow/compare/v1.0.161...v1.0.162) (2024-05-07) | ||
### Bug Fixes | ||
* **idle:** Do not clear preCheck from other command ([cdf7643](https://github.com/postalsys/imapflow/commit/cdf7643952c975556e11a03ceca85f8a57fe1420)) | ||
## [1.0.161](https://github.com/postalsys/imapflow/compare/v1.0.160...v1.0.161) (2024-05-06) | ||
@@ -4,0 +11,0 @@ |
@@ -40,3 +40,3 @@ 'use strict'; | ||
connection.preCheck = () => { | ||
let connectionPreCheck = () => { | ||
let handler = new Promise((resolve, reject) => { | ||
@@ -61,5 +61,7 @@ preCheckWaitQueue.push({ resolve, reject }); | ||
connection.preCheck = connectionPreCheck; | ||
response = await connection.exec('IDLE', false, { | ||
onPlusTag: async () => { | ||
connection.log.debug({ msg: `Initiated IDLE, waiting for server input`, doneRequested }); | ||
connection.log.debug({ msg: `Initiated IDLE, waiting for server input`, lockId: connection.currentLock?.lockId, doneRequested }); | ||
canEnd = true; | ||
@@ -75,4 +77,4 @@ if (doneRequested) { | ||
// unset before response.next() | ||
if (typeof connection.preCheck === 'function') { | ||
// unset before response.next() if preCheck function is not already cleared (usually is) | ||
if (typeof connection.preCheck === 'function' && connection.preCheck === connectionPreCheck) { | ||
connection.log.trace({ | ||
@@ -79,0 +81,0 @@ msg: 'Clearing pre-check function', |
@@ -150,2 +150,4 @@ /* eslint no-control-regex:0 */ | ||
existing.listed = !!folder.listed; | ||
existing.status = !!folder.status; | ||
if (folder.specialUse) { | ||
@@ -168,3 +170,4 @@ existing.specialUse = folder.specialUse; | ||
subscribed: !!folder.subscribed, | ||
listed: !!folder.listed | ||
listed: !!folder.listed, | ||
status: !!folder.status | ||
}; | ||
@@ -171,0 +174,0 @@ |
{ | ||
"name": "imapflow", | ||
"version": "1.0.161", | ||
"version": "1.0.162", | ||
"description": "IMAP Client for Node", | ||
@@ -5,0 +5,0 @@ "main": "./lib/imap-flow.js", |
587081
12797