mirror of
https://github.com/juherr/kill-the-news.git
synced 2026-06-20 22:03:48 +00:00
feat(feed): optional per-feed sender-in-title toggle
Add a per-feed senderInTitle flag (domain FeedState.senderInTitle ↔ FeedConfig.sender_in_title). When set, the feed generator prefixes each entry title with [Sender] (display name, falling back to the address). Exposed as an admin edit-form checkbox and across the REST API create/update/response schemas. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -74,8 +74,12 @@ function buildFeed(
|
||||
baseUrl,
|
||||
EmailAddress.parse(email.from)?.siteBaseUrl() ?? "",
|
||||
);
|
||||
const subject = htmlToText(email.subject);
|
||||
const title = feedConfig.sender_in_title
|
||||
? `[${parseFromAddress(email.from).name ?? email.from}] ${subject}`
|
||||
: subject;
|
||||
feed.addItem({
|
||||
title: htmlToText(email.subject),
|
||||
title,
|
||||
id: entryUrl,
|
||||
link: entryUrl,
|
||||
description: bodyContent,
|
||||
|
||||
Reference in New Issue
Block a user