diff --git a/public/admin.html b/public/admin.html index 5ff43d9..45d40c6 100644 --- a/public/admin.html +++ b/public/admin.html @@ -550,6 +550,6 @@ - + diff --git a/public/assets/admin.js b/public/assets/admin.js index 255678c..0553cd4 100644 --- a/public/assets/admin.js +++ b/public/assets/admin.js @@ -514,7 +514,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 2005d90..88e6f31 100644 --- a/updates.js +++ b/updates.js @@ -54,7 +54,7 @@ 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); if (!noteIds.length && !String(input.intro || '').trim()) return { error: 'Write an intro or pick at least one release note.' }; // campaign emails are intro-only (LinkSpin launch, 2026-11-05) 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.' };