Skip to content
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

added check unsubscribe om emailjob handler #536

Closed

Conversation

leobarcellos
Copy link
Contributor

We noticed that sometimes users were receiving emails after unsubscribe event

image

I also noticed, @pushchris, that on CampaignService.ts, on sendCampaignJob function, this comment:
image

I tried to put the unsubscribe check there, but since it's expecting a EmailJob, I could not (I could throw an Error there, but I don't know how it would behave)

So, I ended up putting on the EmailJob handler, since it already have a catch that fires the failSend.

Does it makes sense?

@pushchris
Copy link
Contributor

Definitely right train of thought, the check should be in the MessageTriggerService though to make sure it applies to all channels appropriately. Merged a separate PR in with the changes in the interest of expediency

@pushchris pushchris closed this Nov 9, 2024
@leobarcellos leobarcellos deleted the feat/check-unsubscribed branch November 11, 2024 15:38
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