@bobfrankston/mailx 1.0.201 → 1.0.202
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"height":1344,"width":2151,"x":
|
|
1
|
+
{"height":1344,"width":2151,"x":469,"y":64}
|
package/client/app.js
CHANGED
|
@@ -310,12 +310,15 @@ async function openCompose(mode) {
|
|
|
310
310
|
if (!msg || identityDomains.length === 0)
|
|
311
311
|
return undefined;
|
|
312
312
|
const candidates = [msg.deliveredTo, ...(msg.to || []).map((a) => a.address)].filter(Boolean);
|
|
313
|
+
console.log(`[compose] detectReplyFrom: deliveredTo=${msg.deliveredTo}, to=${msg.to?.map((a) => a.address)}, domains=${identityDomains}`);
|
|
313
314
|
for (const addr of candidates) {
|
|
314
315
|
const domain = addr.split("@")[1]?.toLowerCase();
|
|
315
316
|
if (domain && identityDomains.some((d) => domain === d.toLowerCase())) {
|
|
317
|
+
console.log(`[compose] matched: ${addr}`);
|
|
316
318
|
return addr;
|
|
317
319
|
}
|
|
318
320
|
}
|
|
321
|
+
console.log(`[compose] no identity match`);
|
|
319
322
|
return undefined;
|
|
320
323
|
}
|
|
321
324
|
if (msg && mode === "reply") {
|
|
@@ -415,7 +418,16 @@ function showComposeOverlay() {
|
|
|
415
418
|
function quoteBody(msg) {
|
|
416
419
|
const date = new Date(msg.date).toLocaleString();
|
|
417
420
|
const from = msg.from.name ? `${msg.from.name} <${msg.from.address}>` : msg.from.address;
|
|
418
|
-
|
|
421
|
+
// Simplify complex HTML (tables, inline styles) for Quill compatibility
|
|
422
|
+
let body = msg.bodyHtml || `<pre>${msg.bodyText || ""}</pre>`;
|
|
423
|
+
// Strip style tags and attributes
|
|
424
|
+
body = body.replace(/<style[^>]*>[\s\S]*?<\/style>/gi, "");
|
|
425
|
+
body = body.replace(/\s+style="[^"]*"/gi, "");
|
|
426
|
+
body = body.replace(/\s+class="[^"]*"/gi, "");
|
|
427
|
+
// Convert tables to simple divs
|
|
428
|
+
body = body.replace(/<table[^>]*>/gi, "<div>").replace(/<\/table>/gi, "</div>");
|
|
429
|
+
body = body.replace(/<t[rdh][^>]*>/gi, "").replace(/<\/t[rdh]>/gi, " ");
|
|
430
|
+
body = body.replace(/<thead[^>]*>|<\/thead>|<tbody[^>]*>|<\/tbody>/gi, "");
|
|
419
431
|
return `<br><div class="reply"><p>On ${date}, ${from} wrote:</p><blockquote>${body}</blockquote></div>`;
|
|
420
432
|
}
|
|
421
433
|
function forwardBody(msg) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bobfrankston/mailx",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.202",
|
|
4
4
|
"description": "Local-first email client with IMAP sync and standalone native app",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "bin/mailx.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@bobfrankston/iflow-node": "^0.1.2",
|
|
25
25
|
"@bobfrankston/miscinfo": "^1.0.8",
|
|
26
26
|
"@bobfrankston/oauthsupport": "^1.0.22",
|
|
27
|
-
"@bobfrankston/msger": "^0.1.
|
|
27
|
+
"@bobfrankston/msger": "^0.1.254",
|
|
28
28
|
"@capacitor/android": "^8.3.0",
|
|
29
29
|
"@capacitor/cli": "^8.3.0",
|
|
30
30
|
"@capacitor/core": "^8.3.0",
|
|
@@ -114,9 +114,7 @@ export async function cloudRead(filename) {
|
|
|
114
114
|
}
|
|
115
115
|
catch { /* ignore cache write failure */ }
|
|
116
116
|
}
|
|
117
|
-
|
|
118
|
-
lastCloudError = `Could not read ${filename} from ${pendingCloudConfig.provider} (check credentials)`;
|
|
119
|
-
}
|
|
117
|
+
// Don't set error for missing files — they may not exist yet (e.g., clients.jsonc on first run)
|
|
120
118
|
return content;
|
|
121
119
|
}
|
|
122
120
|
/** Write a file via cloud API */
|