@bobfrankston/rmfmail 1.1.91 → 1.1.93

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/.commitmsg CHANGED
@@ -1,11 +1,20 @@
1
- Fix: typing after a URL no longer swallows text into the link
1
+ Search: index full message bodies, not just the preview snippet
2
2
 
3
- In the TinyMCE editor, typing or pasting a URL auto-linked it, but the
4
- caret stayed inside the <a>, so every following character was appended
5
- into the link text a whole sentence turned into one link.
3
+ Body-text search only ever covered messages the user had opened. At sync
4
+ time the FTS body_text was seeded with the short `preview` snippet; the
5
+ full text was backfilled only when LocalStore.getMessage parsed a body
6
+ on view — and even that backfill keyed on the legacy messages.folder_id
7
+ column via a (account,folder,uid) lookup that could miss the row, so a
8
+ word buried in an opened message's body still wasn't found (Bob:
9
+ "mcdade" in a message body, search found nothing).
6
10
 
7
- rmf-tiny's adapter now has a keypress handler: when a printable key is
8
- pressed with the caret collapsed at the trailing edge of an <a>, the
9
- caret hops to just after the <a> first, so the new text lands outside
10
- the link. Covers autolink, pasted URLs, and hand-made links.
11
- (client/lib/rmf-tiny.js rebuilt from the adapter source.)
11
+ Two fixes:
12
+ - updateFtsBody(rowId, text) keys on the FTS rowid (= messages.id)
13
+ directly no fragile folder lookup. store.ts passes envelope.id.
14
+ - The IMAP sync path now indexes the full body into FTS right after
15
+ upsertMessage. extractPreview already parsed `source`, so the body
16
+ text is free — every synced message is body-searchable without the
17
+ user opening it first.
18
+
19
+ Existing already-synced messages stay preview-only until re-synced
20
+ (mailx -repair re-indexes them).
@@ -1095,7 +1095,8 @@ async function showMessage(accountId, uid, folderId, specialUse, isRetry = false
1095
1095
  const headerEl = document.getElementById("mv-header");
1096
1096
  const bodyEl = document.getElementById("mv-body");
1097
1097
  const attEl = document.getElementById("mv-attachments");
1098
- if (!isRetry && currentMessage && currentAccountId === accountId && currentMessage.uid === uid && (folderId === void 0 || currentMessage.folderId === folderId) && bodyEl.querySelector("iframe")) {
1098
+ const sameMessage = !!currentMessage && currentAccountId === accountId && (envelope?.uuid && currentMessage.uuid ? envelope.uuid === currentMessage.uuid : currentMessage.uid === uid && (folderId === void 0 || currentMessage.folderId === folderId));
1099
+ if (!isRetry && sameMessage && bodyEl.querySelector("iframe")) {
1099
1100
  if (envelope) {
1100
1101
  lastEnvelope = envelope;
1101
1102
  try {