POPIA toolkit part 1: privacy page, unsubscribe, WhatsApp STOP, data requests

- Privacy page: news opt-in per channel with history, download my data
  (JSON + PDF), correction and deletion requests
- Bulk messages are an Event update or News & announcements; news only
  reaches people who opted in, with unsubscribe links, one-click
  List-Unsubscribe headers and "Reply STOP" on WhatsApp
- WhatsApp STOP via WAWP's message webhook, checked against a secret in
  the webhook URL
- Sign-up opt-in box; existing accounts kept opted in and asked once
- Admin -> Data requests with 30-day due dates and a daily reminder job
- Deleting an account is a request; anonymising now covers attendees,
  form answers, consent details, payer details in provider payloads, etc.
- Unit tests (privacy.test.js) and e2e (privacy.spec.ts); docs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012mt6TCv85T9VKRq3cV7rXq
This commit is contained in:
2026-10-23 18:13:47 +02:00
co-authored by Claude Opus 5.5
parent be5ad620da
commit 594cb35a85
47 changed files with 2871 additions and 143 deletions
@@ -746,6 +746,8 @@ interface ConfigResponse {
hasToken: boolean;
hasInstance: boolean;
configured: boolean;
// Where WAWP should send events; carries the secret incoming messages are checked against.
webhookUrl?: string;
}
interface StatusResponse {
@@ -1182,6 +1184,22 @@ function WhatsAppTab({ active }: { active: boolean }) {
</section>
)}
{cfg?.webhookUrl && (
<section className="border rounded-xl p-5 bg-gray-50 space-y-3">
<h3 className="text-base font-semibold">Webhook (STOP replies)</h3>
<p className="text-sm text-gray-600">
So people can reply <strong>STOP</strong> to stop news on WhatsApp: in the WAWP dashboard, click <em>Webhook</em> on
your instance, paste this URL and tick the <code>message</code> and <code>session.status</code> events. Keep it
private — the secret at the end is what proves a message came from WAWP.
</p>
<div className="flex gap-2">
<input readOnly value={cfg.webhookUrl} className="flex-1 min-w-0 border rounded-lg px-3 py-2 text-xs font-mono bg-white" onFocus={e => e.target.select()} />
<button type="button" className="px-3 py-2 rounded-lg border text-sm bg-white hover:bg-gray-50" onClick={() => navigator.clipboard?.writeText(cfg.webhookUrl || "")}>Copy</button>
</div>
<p className="text-xs text-gray-500">The URL must be reachable from the internet over HTTPS (set <code>BACKEND_URL</code> on the server).</p>
</section>
)}
<section className="border rounded-xl p-5 bg-gray-50 space-y-4">
<h3 className="text-base font-semibold">Session Controls</h3>
<div className="flex flex-wrap gap-3">