mirror of
https://github.com/juherr/kill-the-news.git
synced 2026-06-20 22:03:48 +00:00
refactor(domain): slim detectConfirmation contract
Return the ranked links directly (string[] | null) instead of an unused
{score, links} wrapper, and drop the redundant hasKeyword helper in favor
of matchesAny(_, KEYWORDS). No behavior change.
This commit is contained in:
@@ -187,7 +187,7 @@ async function storeEmail(
|
||||
return false; // signal: skipped (not stored)
|
||||
}
|
||||
|
||||
const confirmation = detectConfirmation({
|
||||
const confirmationLinks = detectConfirmation({
|
||||
subject: input.subject,
|
||||
text: htmlToText(input.content),
|
||||
links: extractLinks(input.content),
|
||||
@@ -229,7 +229,9 @@ async function storeEmail(
|
||||
...(inlineIds.length > 0 ? { inlineAttachmentIds: inlineIds } : {}),
|
||||
...(messageId ? { messageId } : {}),
|
||||
dedupHash,
|
||||
...(confirmation ? { confirmation: { links: confirmation.links } } : {}),
|
||||
...(confirmationLinks
|
||||
? { confirmation: { links: confirmationLinks } }
|
||||
: {}),
|
||||
};
|
||||
|
||||
// Track the latest sender's domain (feed icon) and capture the RFC 8058
|
||||
|
||||
Reference in New Issue
Block a user