@bobfrankston/rmfmail 1.1.185 → 1.1.187

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.
@@ -1082,6 +1082,18 @@ export class ImapManager extends EventEmitter {
1082
1082
  source: string,
1083
1083
  flags: string[],
1084
1084
  ): Promise<void> {
1085
+ // Guard against uid <= 0. Valid IMAP UIDs are always ≥ 1; a 0 here
1086
+ // means the APPENDUID capture failed (server returned no UIDPLUS, or
1087
+ // appendMessage resolved to 0 instead of null) and the caller didn't
1088
+ // catch it. Inserting uid=0 created a phantom INBOX row with no
1089
+ // message_id, no body, no subject — the "blank line in the summary"
1090
+ // (Bob 2026-05-28). Refuse it; the caller's syncFolder fallback will
1091
+ // pick the message up with its real UID on the next sync.
1092
+ if (!uid || uid <= 0) {
1093
+ console.error(` [insert] refusing uid=${uid} for ${accountId}/${folder.path} — invalid IMAP UID (APPENDUID likely failed); deferring to sync`);
1094
+ this.syncFolder(accountId, folder.id).catch(() => {});
1095
+ return;
1096
+ }
1085
1097
  // insertLocalRowFromSource runs right after sendMessage — that's a
1086
1098
  // user-initiated path but the parse cost is on the post-send
1087
1099
  // background work, not the click-through. Tag as background so a
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@bobfrankston/mailx-imap",
3
- "version": "0.1.69",
3
+ "version": "0.1.70",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@bobfrankston/mailx-imap",
9
- "version": "0.1.69",
9
+ "version": "0.1.70",
10
10
  "license": "ISC",
11
11
  "dependencies": {
12
12
  "@bobfrankston/iflow-direct": "^0.1.27",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/mailx-imap",
3
- "version": "0.1.69",
3
+ "version": "0.1.70",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",