Email an update: release notes are optional when there is an intro

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-09-28 05:22:24 -05:00
parent a9cffb87d4
commit ab2431be11
3 changed files with 5 additions and 3 deletions
+3 -1
View File
@@ -59,7 +59,9 @@ function compose({ subject, intro, noteIds, closing }, acct) {
let running = null;
async function send(input, opts) {
const noteIds = (input.noteIds || []).map(String); if (!noteIds.length) return { error: 'Pick at least one release note.' };
const noteIds = (input.noteIds || []).map(String);
// a plain message needs no release notes (Marty, 2026-09-28): notes OR an intro, never a forced note
if (!noteIds.length && !String(input.intro || '').trim()) return { error: 'Write an intro or pick at least one release note.' };
if (!R.mailer.hasKey()) return { error: 'The mailer is not configured on this server.' };
if (opts && opts.test) {
const to = R.adminEmail; if (!to) return { error: 'No admin email configured.' };