diff --git a/public/admin.html b/public/admin.html index b9670e1..ab9eb75 100644 --- a/public/admin.html +++ b/public/admin.html @@ -511,6 +511,6 @@ - + diff --git a/public/assets/admin.js b/public/assets/admin.js index dad78a6..4b069b8 100644 --- a/public/assets/admin.js +++ b/public/assets/admin.js @@ -555,7 +555,7 @@ $('updPreview').addEventListener('click', busy($('updPreview'), async () => { const r = await api('/api/admin/updates/preview', updInput()); $('updPre').hidden = false; $('updPre').textContent = 'Subject: ' + r.subject + '\n\n' + r.text; })); $('updTest').addEventListener('click', busy($('updTest'), async () => { const r = await api('/api/admin/updates/send', Object.assign(updInput(), { test: true })); IAP.status('Test sent to ' + r.to + '.', 'ok'); })); $('updSend').addEventListener('click', busy($('updSend'), async () => { - const inp = updInput(); if (!inp.noteIds.length) { IAP.status('Pick at least one note.', 'bad'); return; } + const inp = updInput(); if (!inp.noteIds.length && !String(inp.intro || '').trim()) { IAP.status('Write an intro or pick at least one note.', 'bad'); return; } const opt = $('updAudience').selectedOptions[0].textContent; if (!(await IAP.confirmBox('Send this update to ' + opt + '? One email per member, opt-outs skipped.', { title: 'Send member update', ok: 'Send now', cancel: 'Not yet' }))) return; const r = await api('/api/admin/updates/send', inp); IAP.status('Sending to ' + r.total + ' members in the background.', 'ok'); loadUpdates(); diff --git a/updates.js b/updates.js index 17a65ea..ac0f19a 100644 --- a/updates.js +++ b/updates.js @@ -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.' };