Fix 'confirmed' subscriptions becoming 'unconfirmed' on public form re-signup. Closes #1441.

This commit is contained in:
Kailash Nadh 2023-11-11 18:46:38 +05:30
parent 62be5e2181
commit 44d3462559

View file

@ -178,6 +178,7 @@ INSERT INTO subscriber_lists (subscriber_id, list_id, status)
WHEN $4='blocklisted' THEN 'unsubscribed'::subscription_status
-- When subscriber is edited from the admin form, retain the status. Otherwise, a blocklisted
-- subscriber when being re-enabled, their subscription statuses change.
WHEN subscriber_lists.status = 'confirmed' THEN 'confirmed'
WHEN $9 = TRUE THEN subscriber_lists.status
ELSE $8::subscription_status
END