@bobfrankston/mailx 1.0.450 → 1.0.451
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/package.json +1 -1
- package/packages/mailx-imap/index.js +15 -0
package/package.json
CHANGED
|
@@ -992,6 +992,14 @@ export class ImapManager extends EventEmitter {
|
|
|
992
992
|
this.db.updateMessageFlags(accountId, msg.uid, flags);
|
|
993
993
|
continue;
|
|
994
994
|
}
|
|
995
|
+
// Tombstone check — same reason as the streamy onChunk path
|
|
996
|
+
// at storeMessages: a locally-deleted message that the server
|
|
997
|
+
// hasn't EXPUNGEd yet would otherwise reappear on next sync.
|
|
998
|
+
// User-visible symptom: "I deleted it but it came back."
|
|
999
|
+
if (msg.messageId && this.db.hasTombstone(accountId, msg.messageId)) {
|
|
1000
|
+
console.log(` [tombstone] ${accountId}: skipping ${msg.messageId} in syncFolder (locally deleted)`);
|
|
1001
|
+
continue;
|
|
1002
|
+
}
|
|
995
1003
|
// Store body
|
|
996
1004
|
const source = msg.source || "";
|
|
997
1005
|
let bodyPath = "";
|
|
@@ -1479,6 +1487,13 @@ export class ImapManager extends EventEmitter {
|
|
|
1479
1487
|
// standalone — bad rows are logged and skipped.
|
|
1480
1488
|
for (const msg of msgs) {
|
|
1481
1489
|
try {
|
|
1490
|
+
// Tombstone check — Gmail API sync was missing this so a
|
|
1491
|
+
// locally-trashed Gmail message would reappear on the next
|
|
1492
|
+
// listMessages tick if Gmail's eventual-consistency hadn't
|
|
1493
|
+
// promoted the trash yet. Symmetric with the IMAP paths.
|
|
1494
|
+
if (msg.messageId && this.db.hasTombstone(accountId, msg.messageId)) {
|
|
1495
|
+
continue;
|
|
1496
|
+
}
|
|
1482
1497
|
const flags = [];
|
|
1483
1498
|
if (msg.seen)
|
|
1484
1499
|
flags.push("\\Seen");
|