这是indexloc提供的服务,不要输入任何密码
Skip to content

feat: allow users to control their Sendgrid unsubscribe settings #4615

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

kueda
Copy link
Member

@kueda kueda commented Jun 11, 2025

Still needs quite a bit of testing. See the Linear issue for my take on what needs assessment and how to test this branch.

Closes WEB-391

kueda added 10 commits June 5, 2025 16:24
* make a new pref for activity / daily update email that is separate from the
  messages preference
* add experimental UI in Account Settings
* support control over select Sendgrid suppression groups from Account
  Settings
* refactor EmailSuppression#destroy_remote to use SendgridService
* support new unsubscribe groups for activity, message, and onboarding emails
* continue support for the transactional group for now, i.e. we will not
  deliver a daily update email if the user is suppressed in the transactional
  group, even if they are not suppressed in the activity group
* send cohort experiment emails with the onboarding group, which means users
  can unsubscribe from them
* fix bug in which domain_is_not_supported error for users was not being
  correctly reported or translated
* Set up a webhook endpoint for use with Sendgrid, secured by OAuth
* Process unsubscribe and resubscribe events to create/destroy
  EmailSuppression records for local use, and keep
  prefers_message_email_notification setting in sync until we can remove it
* Add temporary callback in User to try to keep suppressions in sync with the
  prefers_message_email_notification pref
* Require email attribute for all EmailSuppression records, and attempt to
  populate it from the associated user on create
* Remove new prefers_activity_email_notification setting, which is redundant
  with the EmailSuppression record (so is the messages one, but that's
  already in prod)
* Refactor User#suppressed_in_group? for clarity (too much multiple negation)
  and to get it to work the way it seems like it was intended to work
  (unnecessarily restricted to a set of groups)
* Add admin-only section to Account Settings for access to these finer
  controls
@kueda kueda marked this pull request as ready for review June 12, 2025 19:10
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.

1 participant