@bobfrankston/mailx-imap 0.1.56 → 0.1.57
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/index.js +37 -2
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -3195,6 +3195,15 @@ export class ImapManager extends EventEmitter {
|
|
|
3195
3195
|
}
|
|
3196
3196
|
continue;
|
|
3197
3197
|
}
|
|
3198
|
+
// Success — clear the in-flight delete/move
|
|
3199
|
+
// suppression (see the IMAP branch below for the
|
|
3200
|
+
// full rationale). After a move the local row lives
|
|
3201
|
+
// at the TARGET folder, so the (uid, folder) lookup
|
|
3202
|
+
// uses targetFolderId.
|
|
3203
|
+
if (action.action === "move") {
|
|
3204
|
+
this.db.clearTombstoneForUid(accountId, action.uid, action.targetFolderId);
|
|
3205
|
+
this.db.clearMessagePendingDelete(accountId, action.uid, action.targetFolderId);
|
|
3206
|
+
}
|
|
3198
3207
|
this.db.completeSyncAction(action.id);
|
|
3199
3208
|
}
|
|
3200
3209
|
catch (e) {
|
|
@@ -3204,7 +3213,11 @@ export class ImapManager extends EventEmitter {
|
|
|
3204
3213
|
// Terminal failure on delete/move → clear tombstone
|
|
3205
3214
|
// so the row reappears on next sync (server still
|
|
3206
3215
|
// has it). Same rationale as the IMAP branch below.
|
|
3207
|
-
if (action.action === "
|
|
3216
|
+
if (action.action === "move") {
|
|
3217
|
+
this.db.clearTombstoneForUid(accountId, action.uid, action.targetFolderId);
|
|
3218
|
+
this.db.clearMessagePendingDelete(accountId, action.uid, action.targetFolderId);
|
|
3219
|
+
}
|
|
3220
|
+
else if (action.action === "delete") {
|
|
3208
3221
|
this.db.clearTombstoneForUid(accountId, action.uid, action.folderId);
|
|
3209
3222
|
}
|
|
3210
3223
|
this.db.completeSyncAction(action.id);
|
|
@@ -3280,6 +3293,22 @@ export class ImapManager extends EventEmitter {
|
|
|
3280
3293
|
break;
|
|
3281
3294
|
}
|
|
3282
3295
|
}
|
|
3296
|
+
// Success: the local action reached the server. Lift the
|
|
3297
|
+
// in-flight delete/move suppression so the destination
|
|
3298
|
+
// folder syncs the moved message under its real
|
|
3299
|
+
// post-move UID. hasTombstone's documented contract is
|
|
3300
|
+
// "cleared on successful action complete OR permanent
|
|
3301
|
+
// failure" — only the failure half had been wired, so a
|
|
3302
|
+
// successful move left a Message-ID tombstone alive for
|
|
3303
|
+
// 30 days, blocking the Trash folder from ever storing
|
|
3304
|
+
// the message (and resurrecting it once the tombstone
|
|
3305
|
+
// finally aged out). After a move the local row lives at
|
|
3306
|
+
// the TARGET folder, so the (uid, folder) lookup uses
|
|
3307
|
+
// targetFolderId.
|
|
3308
|
+
if (action.action === "move") {
|
|
3309
|
+
this.db.clearTombstoneForUid(accountId, action.uid, action.targetFolderId);
|
|
3310
|
+
this.db.clearMessagePendingDelete(accountId, action.uid, action.targetFolderId);
|
|
3311
|
+
}
|
|
3283
3312
|
this.db.completeSyncAction(action.id);
|
|
3284
3313
|
}
|
|
3285
3314
|
catch (e) {
|
|
@@ -3296,7 +3325,13 @@ export class ImapManager extends EventEmitter {
|
|
|
3296
3325
|
// reflecting "your action didn't take, here it is
|
|
3297
3326
|
// again." Applies to delete + move; flags/append
|
|
3298
3327
|
// never tombstone.
|
|
3299
|
-
if (action.action === "
|
|
3328
|
+
if (action.action === "move") {
|
|
3329
|
+
// Local row is at the TARGET folder (the local
|
|
3330
|
+
// move committed; only the server move failed).
|
|
3331
|
+
this.db.clearTombstoneForUid(accountId, action.uid, action.targetFolderId);
|
|
3332
|
+
this.db.clearMessagePendingDelete(accountId, action.uid, action.targetFolderId);
|
|
3333
|
+
}
|
|
3334
|
+
else if (action.action === "delete") {
|
|
3300
3335
|
this.db.clearTombstoneForUid(accountId, action.uid, action.folderId);
|
|
3301
3336
|
}
|
|
3302
3337
|
this.db.completeSyncAction(action.id);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bobfrankston/mailx-imap",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.57",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@bobfrankston/mailx-types": "^0.1.18",
|
|
13
13
|
"@bobfrankston/mailx-settings": "^0.1.22",
|
|
14
|
-
"@bobfrankston/mailx-store": "^0.1.
|
|
14
|
+
"@bobfrankston/mailx-store": "^0.1.34",
|
|
15
15
|
"@bobfrankston/iflow-direct": "^0.1.50",
|
|
16
16
|
"@bobfrankston/tcp-transport": "^0.1.6",
|
|
17
17
|
"@bobfrankston/smtp-direct": "^0.1.8",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@bobfrankston/mailx-types": "^0.1.18",
|
|
41
41
|
"@bobfrankston/mailx-settings": "^0.1.22",
|
|
42
|
-
"@bobfrankston/mailx-store": "^0.1.
|
|
42
|
+
"@bobfrankston/mailx-store": "^0.1.34",
|
|
43
43
|
"@bobfrankston/iflow-direct": "^0.1.50",
|
|
44
44
|
"@bobfrankston/tcp-transport": "^0.1.6",
|
|
45
45
|
"@bobfrankston/smtp-direct": "^0.1.8",
|