@bobfrankston/rmfmail 1.2.83 → 1.2.84

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.ts CHANGED
@@ -1075,6 +1075,14 @@ async function openCompose(mode: ComposeMode, overrideMsg?: any, overrideAccount
1075
1075
  init.cc = Array.isArray(msg.cc) ? msg.cc : [];
1076
1076
  init.subject = msg.subject || "";
1077
1077
  init.bodyHtml = editAsNewBody(msg);
1078
+ // From: preserve the original sender when it's one of YOUR accounts
1079
+ // (resending your own message keeps the same identity); otherwise fall
1080
+ // back to received-identity detection. Without this, edit-as-new always
1081
+ // defaulted to the primary account — "a different from address" (Bob
1082
+ // 2026-06-29).
1083
+ const origFrom = msg.from?.address ? bareAddress(msg.from.address) : "";
1084
+ const ownFrom = origFrom && accounts.some((acc: any) => bareAddress(acc.email || "") === origFrom) ? origFrom : undefined;
1085
+ init.fromAddress = ownFrom || detectReplyFrom();
1078
1086
  }
1079
1087
 
1080
1088
  // Carry the original message's attachments into forward / edit-as-new so
@@ -4549,6 +4549,7 @@ async function saveDraft2() {
4549
4549
  window.__mailxSaveDraft = saveDraft2;
4550
4550
  lastDraftContent = content;
4551
4551
  draftSaving = true;
4552
+ if (!draftId) draftId = `mailx-draft-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
4552
4553
  try {
4553
4554
  const data = await saveDraft({
4554
4555
  accountId: getFromAccountId(),