diff --git a/src/lib/notify.ts b/src/lib/notify.ts new file mode 100644 index 0000000..1386a88 --- /dev/null +++ b/src/lib/notify.ts @@ -0,0 +1,16 @@ +import type { PulseRow } from './db.js'; + +/** + * Fired when an admin promotes a pulse from draft → open. Today this is a + * console.log stub; the integration (transactional email or Slack webhook) + * lands in a later phase. The call site stays the same once wired up — only + * this function body changes. + * + * TODO: replace with the production notifier when chosen. Likely options: + * - Postmark / Resend transactional email to all CAB members + * - Slack webhook to a council-only channel + */ +export function notifyPulseOpened(pulse: PulseRow): void { + // eslint-disable-next-line no-console + console.log(`[notify] pulse opened: "${pulse.question}" — closes ${pulse.closes_at}`); +}