Closed leobarcellos closed 1 week ago
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
We noticed that sometimes users were receiving emails after unsubscribe event
I also noticed, @pushchris, that on CampaignService.ts, on sendCampaignJob function, this comment:
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?