@bobfrankston/rmfmail 1.1.190 → 1.1.192
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/client/app.bundle.js +21 -11
- package/client/app.bundle.js.map +2 -2
- package/client/app.js +18 -3
- package/client/app.js.map +1 -1
- package/client/app.ts +16 -3
- package/client/compose/compose.bundle.js +11 -8
- package/client/compose/compose.bundle.js.map +2 -2
- package/client/index.html +1 -1
- package/client/lib/api-client.js +27 -5
- package/client/lib/api-client.js.map +1 -1
- package/client/lib/api-client.ts +26 -6
- package/client/styles/components.css +1 -1
- package/package.json +5 -5
- /package/packages/mailx-imap/{node_modules.npmglobalize-stash-72292 → node_modules.npmglobalize-stash-42480}/.package-lock.json +0 -0
package/client/app.js
CHANGED
|
@@ -893,6 +893,20 @@ async function openCompose(mode, overrideMsg, overrideAccountId) {
|
|
|
893
893
|
const identityDomains = foldDomains(explicitDomains.length > 0
|
|
894
894
|
? explicitDomains
|
|
895
895
|
: (accountDomain ? [accountDomain] : []));
|
|
896
|
+
// Extract the bare email address from a header value that may be a full
|
|
897
|
+
// `"Display Name" <addr@host>` form. detectReplyFrom must return a BARE
|
|
898
|
+
// address because the compose side wraps it as `${accountName} <${addr}>`
|
|
899
|
+
// — passing a full name+addr there produced the nested garbage
|
|
900
|
+
// `Bob Frankston <"mailing list" <multicians@groups.io>>` (Bob 2026-05-28).
|
|
901
|
+
// Delivered-To on mailing-list mail commonly carries a display name.
|
|
902
|
+
function bareAddress(raw) {
|
|
903
|
+
if (!raw)
|
|
904
|
+
return raw;
|
|
905
|
+
const angle = raw.match(/<([^>]+)>/);
|
|
906
|
+
if (angle)
|
|
907
|
+
return angle[1].trim();
|
|
908
|
+
return raw.trim().replace(/^"+|"+$/g, "");
|
|
909
|
+
}
|
|
896
910
|
function detectReplyFrom() {
|
|
897
911
|
if (!msg)
|
|
898
912
|
return undefined;
|
|
@@ -902,15 +916,16 @@ async function openCompose(mode, overrideMsg, overrideAccountId) {
|
|
|
902
916
|
// when their domain matches the account's identityDomains, since To/Cc
|
|
903
917
|
// can be set by the sender and aren't authoritative.
|
|
904
918
|
if (msg.deliveredTo) {
|
|
905
|
-
|
|
906
|
-
|
|
919
|
+
const addr = bareAddress(msg.deliveredTo);
|
|
920
|
+
console.log(`[compose] reply From → ${addr} (Delivered-To, bare of "${msg.deliveredTo}")`);
|
|
921
|
+
return addr;
|
|
907
922
|
}
|
|
908
923
|
if (identityDomains.length === 0)
|
|
909
924
|
return undefined;
|
|
910
925
|
const candidates = [
|
|
911
926
|
...((msg.to || []).map((a) => a.address)),
|
|
912
927
|
...((msg.cc || []).map((a) => a.address)),
|
|
913
|
-
].filter(Boolean);
|
|
928
|
+
].filter(Boolean).map(bareAddress);
|
|
914
929
|
for (const addr of candidates) {
|
|
915
930
|
const domain = addr.split("@")[1]?.toLowerCase();
|
|
916
931
|
if (domain && identityDomains.some(d => domain === d || domain.endsWith(`.${d}`))) {
|