app: prayer requests' backend (APP-1.0-PLAN §4)
Private by default (the prayer team only) or shared with members after a coordinator approves it, with the first name or "Anonymous"; fully anonymous requests when the church allows them (off by default). Coordinators approve, redact (the sender told what changed) or remove (with a reason); anyone on the team can escalate to Pastoral care (email and WhatsApp at once, an Owner or Church admin when nobody has the role): it leaves the shared list and the sender sees nothing different. "I prayed" counts without who, "Answered!" updates, private replies from the team, closing after 30 days (7-90) and deletion 12 months later (prayer-requests-tidy). Every list with a sender is access-logged; messages never carry a request's text; nothing in the heartbeat. Export and delete for a member's requests. Shared helpers: parse (http.ts), accessLog (lib/accessLog.ts). Migration 20261203000000_prayer_requests (checked on PostgreSQL 18: applies, no diff). 78 backend tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
import type { Ctx } from '../context.js';
|
||||
|
||||
export type OutboxKind = 'prayer-reminder' | 'prayer-renewal' | 'testimony-removed';
|
||||
export type OutboxKind = 'prayer-reminder' | 'prayer-renewal' | 'testimony-removed' | 'request-new' | 'request-update' | 'request-escalated';
|
||||
export type Channel = 'email' | 'whatsapp' | 'both';
|
||||
|
||||
/** Queues a message; false when one with the same key was already queued (never sent twice). */
|
||||
|
||||
Reference in New Issue
Block a user