Skip to content

Let a new sign-up put an address back after it left that list - #6

Open
wachtelhund wants to merge 1 commit into
mainfrom
lift-unsubscribe-on-subscribe
Open

wachtelhund wants to merge 1 commit into
mainfrom
lift-unsubscribe-on-subscribe

Conversation

@wachtelhund

Copy link
Copy Markdown
Contributor

POST /subscribe already answered {ok: true} when a list-scoped unsubscribe suppression dropped the sign-up, so status stayed subscribed: false.

A new sign-up for a list, from any form or client, now lifts that list's unsubscribe suppression and puts the address back. Bounce, complaint, and Mailchimp-cleaned are never lifted. Known contacts and existing consent records are still left alone.

This is the general form of the rule in #4, which #5 reverted because it special-cased sourceful-app. Open web forms can still be used to sign someone else up again after they left. That is the same class of risk as the first sign-up, and stays until double opt-in.

Do not merge or deploy from this author.

POST /subscribe already answered ok when a list-scoped unsubscribe
suppression dropped the sign-up, so status stayed false. Any form
now lifts that list's unsubscribe and signs the address up again.
Bounce, complaint, and Mailchimp-cleaned are unchanged.

@miravoss26 miravoss26 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets a new sign-up for a list lift that list's unsubscribe suppression and puts the address back. Docs, code and tests are updated together, CI test is green.

  • Needs a human decision (consent): with open forms and no double opt-in, anyone can type another person's address and undo that person's unsubscribe. The PR description already says this stays until double opt-in. For a mailing list that is a consent and marketing-law question (GDPR / marknadsföringslagen), not just a product one. A cheap mitigation: only lift when the sign-up comes from a keyed server form, not an open browser form.
  • Scope looks right: the DELETE only matches scope = list AND reason = 'unsubscribe', so bounce, complaint, Mailchimp-cleaned and * suppressions stay. It runs first in the same DB.batch, so the free check sees it.
  • Tests cover the other-list case and all three hard-suppression reasons.

Code is fine from my read. Needs a human decision on the consent question before merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants