diff --git a/aggregates.yaml b/aggregates.yaml index 6616a92..9b820ed 100644 --- a/aggregates.yaml +++ b/aggregates.yaml @@ -14,10 +14,15 @@ aggregates: unsubscribed: { event: unsubscribed } transitions: open: [unsubscribed] + # Double opt-in: a watcher is pending until the address confirms from + # the mail n8n sends (redoal: confirm watching); only open watchers + # are told when something lands at their shape. - bucket: redoal_watchers - initial: open + initial: pending states: - open: { event: subscribed } + pending: { event: requested } + open: { event: confirmed } unsubscribed: { event: unsubscribed } transitions: + pending: [open, unsubscribed] open: [unsubscribed] diff --git a/questions/review/index.yaml b/questions/review/index.yaml index 096be87..c517fa8 100644 --- a/questions/review/index.yaml +++ b/questions/review/index.yaml @@ -68,7 +68,14 @@ alternatives: bucket: redoal_watchers requires_group: owners transitions: - - to: unsubscribed + - from: pending + to: open + label: Confirm by hand + - from: pending + to: unsubscribed + label: Drop + - from: open + to: unsubscribed label: Unsubscribe - name: Announced pages diff --git a/questions/shape/[key].yaml b/questions/shape/[key].yaml index 0503b1e..e9bca64 100644 --- a/questions/shape/[key].yaml +++ b/questions/shape/[key].yaml @@ -68,7 +68,9 @@ alternatives: - name: Where the note goes description: > The note is about one exact address, so it needs one exact - place to land. + place to land. One mail comes first, asking you to confirm — + nothing is sent before you do, and at most one note a day + after. icon: lucide:mail requirements: - name: email diff --git a/questions/watching.yaml b/questions/watching.yaml new file mode 100644 index 0000000..3a03928 --- /dev/null +++ b/questions/watching.yaml @@ -0,0 +1,27 @@ +# Landing page of the confirmation mail: /watching?chain=&email=
. +# A followup - never in the nav; the record id in the link is the only +# way here, and it plus the matching email is what authorizes the +# transition (portal's self_transition). +followup: true +name: Are you watching this address? +description: > + Someone asked to hear from a shape on redoal with your address. Say + yes and you get one note when something is left there — nothing + else, ever. Say it wasn't you and the request is dropped. +alternatives: + - name: Yes, watch it + description: > + One note per day at most, only when a recording or a program + lands at exactly this shape. + self_transition: + bucket: redoal_watchers + to: open + label: Yes, watch it + + - name: That wasn't me + description: > + The request is dropped and the address stays unused. + self_transition: + bucket: redoal_watchers + to: unsubscribed + label: Drop it