@bobfrankston/mailx-imap 0.1.69 → 0.1.70
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 +12 -0
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -1049,6 +1049,18 @@ export class ImapManager extends EventEmitter {
|
|
|
1049
1049
|
*
|
|
1050
1050
|
* Fires the same emits as a normal sync so the UI updates. */
|
|
1051
1051
|
async insertLocalRowFromSource(accountId, folder, uid, source, flags) {
|
|
1052
|
+
// Guard against uid <= 0. Valid IMAP UIDs are always ≥ 1; a 0 here
|
|
1053
|
+
// means the APPENDUID capture failed (server returned no UIDPLUS, or
|
|
1054
|
+
// appendMessage resolved to 0 instead of null) and the caller didn't
|
|
1055
|
+
// catch it. Inserting uid=0 created a phantom INBOX row with no
|
|
1056
|
+
// message_id, no body, no subject — the "blank line in the summary"
|
|
1057
|
+
// (Bob 2026-05-28). Refuse it; the caller's syncFolder fallback will
|
|
1058
|
+
// pick the message up with its real UID on the next sync.
|
|
1059
|
+
if (!uid || uid <= 0) {
|
|
1060
|
+
console.error(` [insert] refusing uid=${uid} for ${accountId}/${folder.path} — invalid IMAP UID (APPENDUID likely failed); deferring to sync`);
|
|
1061
|
+
this.syncFolder(accountId, folder.id).catch(() => { });
|
|
1062
|
+
return;
|
|
1063
|
+
}
|
|
1052
1064
|
// insertLocalRowFromSource runs right after sendMessage — that's a
|
|
1053
1065
|
// user-initiated path but the parse cost is on the post-send
|
|
1054
1066
|
// background work, not the click-through. Tag as background so a
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bobfrankston/mailx-imap",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.70",
|
|
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.25",
|
|
14
|
-
"@bobfrankston/mailx-store": "^0.1.
|
|
14
|
+
"@bobfrankston/mailx-store": "^0.1.41",
|
|
15
15
|
"@bobfrankston/iflow-direct": "^0.1.51",
|
|
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.25",
|
|
42
|
-
"@bobfrankston/mailx-store": "^0.1.
|
|
42
|
+
"@bobfrankston/mailx-store": "^0.1.41",
|
|
43
43
|
"@bobfrankston/iflow-direct": "^0.1.51",
|
|
44
44
|
"@bobfrankston/tcp-transport": "^0.1.6",
|
|
45
45
|
"@bobfrankston/smtp-direct": "^0.1.8",
|