@bobfrankston/mailx-imap 0.1.37 → 0.1.38
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 +20 -0
- package/package.json +5 -5
package/index.js
CHANGED
|
@@ -3140,6 +3140,26 @@ export class ImapManager extends EventEmitter {
|
|
|
3140
3140
|
}
|
|
3141
3141
|
}
|
|
3142
3142
|
const uid = typeof result === "number" ? result : result?.uid || null;
|
|
3143
|
+
// Insert a local DB row + body file immediately so the user's
|
|
3144
|
+
// Drafts folder shows the draft without waiting for the next
|
|
3145
|
+
// full Drafts sync. Bob 2026-05-12: "I started a reply which
|
|
3146
|
+
// I saved as a draft somewhere but I can't find it by looking
|
|
3147
|
+
// in drafts nor by searching." The IMAP APPEND just returned,
|
|
3148
|
+
// so we have both the source bytes and the real server UID —
|
|
3149
|
+
// same pattern copyToSent uses. recalcFolderCounts +
|
|
3150
|
+
// folderCountsChanged inside insertLocalRowFromSource bump
|
|
3151
|
+
// the Drafts badge as well.
|
|
3152
|
+
if (uid !== null && uid > 0) {
|
|
3153
|
+
try {
|
|
3154
|
+
const sourceStr = typeof rawMessage === "string"
|
|
3155
|
+
? rawMessage
|
|
3156
|
+
: rawMessage.toString("utf-8");
|
|
3157
|
+
await this.insertLocalRowFromSource(accountId, drafts, uid, sourceStr, ["\\Draft", "\\Seen"]);
|
|
3158
|
+
}
|
|
3159
|
+
catch (e) {
|
|
3160
|
+
console.error(` [drafts] local-insert after APPEND failed: ${e?.message || e}`);
|
|
3161
|
+
}
|
|
3162
|
+
}
|
|
3143
3163
|
return uid;
|
|
3144
3164
|
});
|
|
3145
3165
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bobfrankston/mailx-imap",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.38",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"license": "ISC",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@bobfrankston/mailx-types": "^0.1.11",
|
|
13
|
-
"@bobfrankston/mailx-settings": "^0.1.
|
|
14
|
-
"@bobfrankston/mailx-store": "^0.1.
|
|
13
|
+
"@bobfrankston/mailx-settings": "^0.1.16",
|
|
14
|
+
"@bobfrankston/mailx-store": "^0.1.19",
|
|
15
15
|
"@bobfrankston/iflow-direct": "^0.1.41",
|
|
16
16
|
"@bobfrankston/tcp-transport": "^0.1.6",
|
|
17
17
|
"@bobfrankston/smtp-direct": "^0.1.8",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
".transformedSnapshot": {
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@bobfrankston/mailx-types": "^0.1.11",
|
|
41
|
-
"@bobfrankston/mailx-settings": "^0.1.
|
|
42
|
-
"@bobfrankston/mailx-store": "^0.1.
|
|
41
|
+
"@bobfrankston/mailx-settings": "^0.1.16",
|
|
42
|
+
"@bobfrankston/mailx-store": "^0.1.19",
|
|
43
43
|
"@bobfrankston/iflow-direct": "^0.1.41",
|
|
44
44
|
"@bobfrankston/tcp-transport": "^0.1.6",
|
|
45
45
|
"@bobfrankston/smtp-direct": "^0.1.8",
|