@bobfrankston/mailx-store 0.1.28 → 0.1.29
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/db.js +8 -3
- package/package.json +5 -5
package/db.js
CHANGED
|
@@ -1355,13 +1355,18 @@ export class MailxDB {
|
|
|
1355
1355
|
// quoted-strings (RFC-strictly forbidden, common in the wild). Run
|
|
1356
1356
|
// libmime over Subject and every address display name once; safe
|
|
1357
1357
|
// to call on already-decoded text (no `=?...?=` markers → no-op).
|
|
1358
|
+
// The `address` is decoded too: a legit address never carries an
|
|
1359
|
+
// encoded-word, so it's a no-op there — but spam sometimes packs the
|
|
1360
|
+
// whole `name <addr>` into the mailbox local-part as one encoded
|
|
1361
|
+
// word (`=?utf-8?q?...=3C...=40...=3E?=@host`). Decoding it at least
|
|
1362
|
+
// renders readable text instead of raw `=3C`/`=C3=A9` gibberish.
|
|
1358
1363
|
msg.subject = decodeHeaderWords(msg.subject);
|
|
1359
1364
|
if (msg.from)
|
|
1360
|
-
msg.from = { name: decodeHeaderWords(msg.from.name || ""), address: msg.from.address || "" };
|
|
1365
|
+
msg.from = { name: decodeHeaderWords(msg.from.name || ""), address: decodeHeaderWords(msg.from.address || "") };
|
|
1361
1366
|
if (msg.to)
|
|
1362
|
-
msg.to = msg.to.map(a => ({ name: decodeHeaderWords(a.name || ""), address: a.address || "" }));
|
|
1367
|
+
msg.to = msg.to.map(a => ({ name: decodeHeaderWords(a.name || ""), address: decodeHeaderWords(a.address || "") }));
|
|
1363
1368
|
if (msg.cc)
|
|
1364
|
-
msg.cc = msg.cc.map(a => ({ name: decodeHeaderWords(a.name || ""), address: a.address || "" }));
|
|
1369
|
+
msg.cc = msg.cc.map(a => ({ name: decodeHeaderWords(a.name || ""), address: decodeHeaderWords(a.address || "") }));
|
|
1365
1370
|
const existing = this.db.prepare("SELECT id, provider_id FROM messages WHERE account_id = ? AND folder_id = ? AND uid = ?").get(msg.accountId, msg.folderId, msg.uid);
|
|
1366
1371
|
if (existing) {
|
|
1367
1372
|
// Backfill provider_id on existing rows that predate this column —
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bobfrankston/mailx-store",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.29",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
},
|
|
10
10
|
"license": "ISC",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@bobfrankston/mailx-types": "^0.1.
|
|
13
|
-
"@bobfrankston/mailx-settings": "^0.1.
|
|
12
|
+
"@bobfrankston/mailx-types": "^0.1.15",
|
|
13
|
+
"@bobfrankston/mailx-settings": "^0.1.18",
|
|
14
14
|
"@bobfrankston/mailx-bus": "^0.1.2",
|
|
15
15
|
"mailparser": "^3.7.2"
|
|
16
16
|
},
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
},
|
|
30
30
|
".transformedSnapshot": {
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@bobfrankston/mailx-types": "^0.1.
|
|
33
|
-
"@bobfrankston/mailx-settings": "^0.1.
|
|
32
|
+
"@bobfrankston/mailx-types": "^0.1.15",
|
|
33
|
+
"@bobfrankston/mailx-settings": "^0.1.18",
|
|
34
34
|
"@bobfrankston/mailx-bus": "^0.1.2",
|
|
35
35
|
"mailparser": "^3.7.2"
|
|
36
36
|
}
|