feat(lib): notify() stub for pulse-opened events
Today this just logs to console. Wired up in step 10's admin pulse-publish handler so the integration point exists from day one — only the body changes when we pick a transactional email or Slack webhook later. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
351d90a3e8
commit
4611b687c9
1 changed files with 16 additions and 0 deletions
16
src/lib/notify.ts
Normal file
16
src/lib/notify.ts
Normal file
|
|
@ -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}`);
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue