@bobfrankston/rmfmail 1.2.290 → 1.2.292

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.
Files changed (53) hide show
  1. package/.commitmsg +24 -34
  2. package/client/android-bootstrap.bundle.js +42 -1
  3. package/client/android-bootstrap.bundle.js.map +2 -2
  4. package/client/app.bundle.js +36 -2
  5. package/client/app.bundle.js.map +2 -2
  6. package/client/components/message-viewer.js +53 -2
  7. package/client/components/message-viewer.js.map +1 -1
  8. package/client/components/message-viewer.ts +53 -3
  9. package/client/compose/compose.bundle.js +5 -1
  10. package/client/compose/compose.bundle.js.map +2 -2
  11. package/client/lib/api-client.js +7 -1
  12. package/client/lib/api-client.js.map +1 -1
  13. package/client/lib/api-client.ts +9 -2
  14. package/client/lib/mailxapi.js +3 -0
  15. package/client/styles/components.css +25 -0
  16. package/npmchanges.md +76 -0
  17. package/package.json +5 -5
  18. package/packages/mailx-imap/package-lock.json +2 -2
  19. package/packages/mailx-imap/package.json +1 -1
  20. package/packages/mailx-service/index.d.ts +20 -0
  21. package/packages/mailx-service/index.d.ts.map +1 -1
  22. package/packages/mailx-service/index.js +37 -0
  23. package/packages/mailx-service/index.js.map +1 -1
  24. package/packages/mailx-service/index.ts +37 -1
  25. package/packages/mailx-service/jsonrpc.js +2 -0
  26. package/packages/mailx-service/jsonrpc.js.map +1 -1
  27. package/packages/mailx-service/jsonrpc.ts +2 -0
  28. package/packages/mailx-service/package.json +1 -1
  29. package/packages/mailx-settings/package.json +1 -1
  30. package/packages/mailx-store/package.json +1 -1
  31. package/packages/mailx-store/store.d.ts.map +1 -1
  32. package/packages/mailx-store/store.js +30 -5
  33. package/packages/mailx-store/store.js.map +1 -1
  34. package/packages/mailx-store/store.ts +30 -5
  35. package/packages/mailx-store-web/android-bootstrap.js +3 -0
  36. package/packages/mailx-store-web/android-bootstrap.js.map +1 -1
  37. package/packages/mailx-store-web/android-bootstrap.ts +3 -0
  38. package/packages/mailx-store-web/package.json +1 -1
  39. package/packages/mailx-store-web/web-jsonrpc.js +2 -0
  40. package/packages/mailx-store-web/web-jsonrpc.js.map +1 -1
  41. package/packages/mailx-store-web/web-jsonrpc.ts +2 -0
  42. package/packages/mailx-store-web/web-service.d.ts +9 -0
  43. package/packages/mailx-store-web/web-service.d.ts.map +1 -1
  44. package/packages/mailx-store-web/web-service.js +28 -0
  45. package/packages/mailx-store-web/web-service.js.map +1 -1
  46. package/packages/mailx-store-web/web-service.ts +23 -1
  47. package/packages/mailx-types/package.json +1 -1
  48. package/packages/mailx-types/trust.d.ts +11 -0
  49. package/packages/mailx-types/trust.d.ts.map +1 -1
  50. package/packages/mailx-types/trust.js +18 -0
  51. package/packages/mailx-types/trust.js.map +1 -1
  52. package/packages/mailx-types/trust.ts +29 -0
  53. /package/packages/mailx-imap/{node_modules.npmglobalize-stash-27100 → node_modules.npmglobalize-stash-50524}/.package-lock.json +0 -0
@@ -9,7 +9,7 @@
9
9
  * drift impossible: there is exactly one path into this pane.
10
10
  */
11
11
 
12
- import { getMessage, updateFlags, allowRemoteContent, flagSenderOrDomain, getAttachment, openAttachment, getMessageSource, addContact, listContacts, upsertContact, unsubscribeOneClick, addPreferredContact, onEvent, subscribeStore } from "../lib/api-client.js";
12
+ import { getMessage, updateFlags, allowRemoteContent, flagSenderOrDomain, trustSenderOrDomain, getAttachment, openAttachment, getMessageSource, addContact, listContacts, upsertContact, unsubscribeOneClick, addPreferredContact, onEvent, subscribeStore } from "../lib/api-client.js";
13
13
  import { isSenderApproved, noteApprovedLocally, refreshApprovedSenders } from "../lib/approved-senders.js";
14
14
  import { buildInviteCard } from "./invite-card.js";
15
15
  import { showContextMenu } from "./context-menu.js";
@@ -1676,9 +1676,13 @@ export async function showMessage(accountId: string, uid: number, folderId?: num
1676
1676
  // see docs/spam-false-positives.md on why tuning it is not the fix.
1677
1677
  const spam = (msg as any).spamScore as {
1678
1678
  score: number; threshold: number; flagged: boolean;
1679
- kind?: string; proved?: boolean; provedBy?: string; reasons?: string[];
1679
+ kind?: string; proved?: boolean; provedBy?: string; reasons?: string[]; trusted?: boolean;
1680
1680
  };
1681
- if (spam && Number.isFinite(spam.score) && (spam.flagged || spam.score >= spam.threshold / 2)) {
1681
+ // A sender the reader has approved, whose identity is proved: the chip
1682
+ // goes with the banner. Repeating the score after the reader has said
1683
+ // "this correspondent is fine" is what turns an indicator into
1684
+ // furniture. (Bob 2026-08-28)
1685
+ if (spam && !spam.trusted && Number.isFinite(spam.score) && (spam.flagged || spam.score >= spam.threshold / 2)) {
1682
1686
  const benign = !!spam.proved || spam.kind === "bulk";
1683
1687
  const level = benign ? "bulk" : spam.flagged ? "high" : "mid";
1684
1688
  const chip = document.createElement("div");
@@ -1726,6 +1730,52 @@ export async function showMessage(accountId: string, uid: number, folderId?: num
1726
1730
  `</div>`).join("") +
1727
1731
  (worst === "info" ? ""
1728
1732
  : `<div class="mv-trust-foot">Links and attachments here should not be opened.</div>`);
1733
+
1734
+ // "Stop warning me about this sender" — the action the note was
1735
+ // missing. Bob 2026-08-28: "I don't need the spam reminder but I
1736
+ // don't want to say show remote content in order to prevent
1737
+ // tracking." Until now the only way to vouch for a sender was the
1738
+ // remote-content banner, which turns on their tracking pixels; this
1739
+ // writes the separate trustedSenders/trustedDomains list instead.
1740
+ //
1741
+ // Offered only where the server's own verdict is the whole finding
1742
+ // and the sender is proved. A forgery banner has no such button: no
1743
+ // list should be able to silence "this message is not what it says
1744
+ // it is", and there is nothing to trust when the identity is the
1745
+ // thing in doubt.
1746
+ const spamOnly = trust.length === 1 && trust[0].id === "server-spam-verdict" && worst !== "danger";
1747
+ const fromAddr = (msg.from?.address || "").toLowerCase();
1748
+ const fromDomain = fromAddr.split("@")[1] || "";
1749
+ if (spamOnly && spam?.proved && fromAddr) {
1750
+ const actions = document.createElement("div");
1751
+ actions.className = "mv-trust-actions";
1752
+ // Name the sender in the label — a button that says "trust" with
1753
+ // no object tells the reader nothing they can verify later.
1754
+ for (const [label, type, value] of [
1755
+ [`Stop warning about ${fromAddr}`, "sender", fromAddr],
1756
+ [`Stop warning about *@${fromDomain}`, "domain", fromDomain],
1757
+ ] as const) {
1758
+ if (!value) continue;
1759
+ const b = document.createElement("button");
1760
+ b.className = "mv-trust-action";
1761
+ b.textContent = label;
1762
+ b.addEventListener("click", async () => {
1763
+ b.disabled = true;
1764
+ try {
1765
+ await trustSenderOrDomain(type, value);
1766
+ warn.remove();
1767
+ document.querySelector(".mv-spamscore")?.remove();
1768
+ } catch (e: any) {
1769
+ // Never fail silently: the reader pressed a button
1770
+ // and must know whether it took.
1771
+ b.disabled = false;
1772
+ b.textContent = `Could not save: ${e?.message || e}`;
1773
+ }
1774
+ });
1775
+ actions.appendChild(b);
1776
+ }
1777
+ warn.appendChild(actions);
1778
+ }
1729
1779
  bodyEl.appendChild(warn);
1730
1780
  }
1731
1781
 
@@ -1122,6 +1122,7 @@ __export(api_client_exports, {
1122
1122
  syncAccount: () => syncAccount,
1123
1123
  syncFolderNow: () => syncFolderNow,
1124
1124
  triggerSync: () => triggerSync,
1125
+ trustSenderOrDomain: () => trustSenderOrDomain,
1125
1126
  undeleteMessage: () => undeleteMessage,
1126
1127
  unsubscribeOneClick: () => unsubscribeOneClick,
1127
1128
  updateCalendarEvent: () => updateCalendarEvent,
@@ -1348,8 +1349,11 @@ function addUserDictWords(words) {
1348
1349
  function removeUserDictWord(word) {
1349
1350
  return ipc().removeUserDictWord?.(word) ?? Promise.resolve([]);
1350
1351
  }
1352
+ function trustSenderOrDomain(type, value) {
1353
+ return ipc().trustSenderOrDomain?.(type, value) ?? Promise.resolve({ trusted: false });
1354
+ }
1351
1355
  function getAllowlist() {
1352
- return ipc().getAllowlist?.() ?? Promise.resolve({ senders: [], domains: [], recipients: [], flaggedSenders: [], flaggedDomains: [] });
1356
+ return ipc().getAllowlist?.() ?? Promise.resolve({ senders: [], domains: [], recipients: [], flaggedSenders: [], flaggedDomains: [], trustedSenders: [], trustedDomains: [] });
1353
1357
  }
1354
1358
  function flagSenderOrDomain(type, value) {
1355
1359
  return ipc().flagSenderOrDomain?.(type, value) ?? Promise.resolve({ flagged: false });