Events 3.8.0, @crosscode/demo 1.1.0: STOP stops all WhatsApp, demo scenarios

Events 3.8.0 (one migration):
- STOP to the church's WhatsApp number stops all WhatsApp, not only news:
  checked before every sendText/sendPdf against WhatsAppStop (by number) and
  User.whatsappOptedOut (from Accounts' user.updated); 2FA codes go by email
- a STOP received here is passed on to Accounts (whatsapp.optout); START turns
  it back on without Accounts; Accounts turning it back on clears it here
- the eight demo scenarios as set-demo profiles, around each church's own
  people (@crosscode/demo, same accounts as Accounts) and campuses; the
  scenario's people are never removed from Accounts

@crosscode/demo 1.1.0: each person's gender.
crosscode script: scenarios as Events demo profiles; Events builds packages/demo.

Checked on PostgreSQL 18: the migration and every scenario loaded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-30 11:42:17 +02:00
co-authored by Claude Opus 5.5
parent 5b9dc559b6
commit 49153e6f07
26 changed files with 549 additions and 48 deletions
+30
View File
@@ -5,6 +5,36 @@ All notable changes to this project are documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project follows [Semantic Versioning](https://semver.org/).
## [3.8.0] - 2026-11-30
Needs contracts 1.21.0 and `@crosscode/demo` 1.1.0 (built with Events; the `crosscode` script on
`main` builds it). **One migration** (`20261130120000_whatsapp_stop`): `User.whatsappOptedOut` and a
`WhatsAppStop` table. No new settings. Works with any Accounts; the opt-out reaches the church's
other products with Accounts 1.9.0. Part of Church App 1.0.0 (docs/APP-1.0-PLAN.md §8 and §12).
### Changed
- **STOP stops all WhatsApp** (APP-1.0-PLAN decision 11), not only news: event updates, tickets,
kids check-in messages and two-step codes too (codes go by email). Checked before every message
(`sendText`, `sendPdf`, `src/utils/whatsappStop.js`), against the numbers that replied STOP here
(`WhatsAppStop`) and the accounts Accounts says opted out (`User.whatsappOptedOut`, from
`user.updated`'s `whatsapp_opted_out`). News on WhatsApp is turned off as before.
- **A STOP received here is passed on to Accounts** (`whatsapp.optout`, contracts 1.20.0), which
keeps it for every product. The reply says how to undo it: the account page in Accounts, or,
without Accounts, reply START (which turns it back on here). With Accounts, START only answers
with the account page; turned back on there, `user.updated` clears this site's STOP for the
number too. STOPP and UITTEKEN (Afrikaans) count as STOP.
### Added
- **Demo scenarios** (contracts 1.21.0, APP-1.0-PLAN §12): `set-demo.js --profile=<scenario>` for
the eight (heritage-parish … clean-campus), each built as one of the four kinds of demo but around
the scenario's church from `@crosscode/demo`: its people (the same as in Accounts, the Website and
the App; leads become the demo staff and event contacts), and its own campuses with people at
their home campus. Accounts' part loads first; the demo then links its people to their accounts
and never removes them (`people.removeDemo` skips the scenario's own). A small church's events
sell to the people it has (the breakfast isn't sold out at St Columba's). The four demos as before.
## [3.7.2] - 2026-11-27
No migrations, no new settings.