imapkit 5.3.1 → 5.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/imapkit.js +12 -12
- package/dist/cjs/server.js +5 -1
- package/dist/esm/server.js +5 -1
- package/package.json +1 -1
package/dist/cjs/server.js
CHANGED
|
@@ -819,7 +819,11 @@ class IMAPServer extends node_stream_1.Stream {
|
|
|
819
819
|
const levels = mailbox.path.split(storage.separator);
|
|
820
820
|
const folderName = levels.pop();
|
|
821
821
|
const parentKey = levels.join(storage.separator);
|
|
822
|
-
|
|
822
|
+
// A child of INBOX lives in INBOX's own folders, unless the personal namespace is "INBOX." itself, where its
|
|
823
|
+
// mailboxes are the namespace's
|
|
824
|
+
const inboxParent = parentKey.toUpperCase() === 'INBOX';
|
|
825
|
+
const holdsNamespace = namespace === this.referenceNamespace && this.inboxHoldsNamespace();
|
|
826
|
+
const parent = ((!inboxParent || !holdsNamespace) && this.folderCache[parentKey]) || storage;
|
|
823
827
|
if (mailbox.folders && Object.keys(mailbox.folders).length && !keepContents) {
|
|
824
828
|
// Sessions that have the mailbox selected keep the old object, a new SELECT finds the
|
|
825
829
|
// placeholder. The placeholder only keeps the children. Plugin data (MAILBOXID, special-use, metadata, ACL,
|
package/dist/esm/server.js
CHANGED
|
@@ -778,7 +778,11 @@ class IMAPServer extends Stream {
|
|
|
778
778
|
const levels = mailbox.path.split(storage.separator);
|
|
779
779
|
const folderName = levels.pop();
|
|
780
780
|
const parentKey = levels.join(storage.separator);
|
|
781
|
-
|
|
781
|
+
// A child of INBOX lives in INBOX's own folders, unless the personal namespace is "INBOX." itself, where its
|
|
782
|
+
// mailboxes are the namespace's
|
|
783
|
+
const inboxParent = parentKey.toUpperCase() === 'INBOX';
|
|
784
|
+
const holdsNamespace = namespace === this.referenceNamespace && this.inboxHoldsNamespace();
|
|
785
|
+
const parent = ((!inboxParent || !holdsNamespace) && this.folderCache[parentKey]) || storage;
|
|
782
786
|
if (mailbox.folders && Object.keys(mailbox.folders).length && !keepContents) {
|
|
783
787
|
// Sessions that have the mailbox selected keep the old object, a new SELECT finds the
|
|
784
788
|
// placeholder. The placeholder only keeps the children. Plugin data (MAILBOXID, special-use, metadata, ACL,
|