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

Send unsubscription token when sending email #1164

Merged
merged 2 commits into from
Feb 20, 2024

Conversation

fmrsabino
Copy link
Contributor

Sends a unsubscriptionUrl substitution to the email provider. This URL includes the token which can be used to unsubscribe from further email notifications.

Since this token is unique, and a token cannot be mapped to a target email address if multiple email addresses are involved, the AlertsRepository now triggers multiple calls to IEmailApi.createMessage (one per each recipient).

@fmrsabino fmrsabino requested a review from a team as a code owner February 19, 2024 15:51
@fmrsabino fmrsabino self-assigned this Feb 19, 2024
Sends a `unsubscriptionUrl` substitution to the email provider. This URL includes the token which can be used to unsubscribe from further email notifications.

Since this token is unique, and a token cannot be mapped to a target email address if multiple email addresses are involved, the `AlertsRepository` now triggers multiple calls to `IEmailApi.createMessage` (one per each recipient).
@fmrsabino fmrsabino force-pushed the send-unsubscription-substitution branch from c71e703 to cc4e98e Compare February 19, 2024 15:55
src/domain/alerts/alerts.repository.ts Outdated Show resolved Hide resolved
src/domain/alerts/alerts.repository.ts Outdated Show resolved Hide resolved
Co-authored-by: Aaron Cook <aaron@safe.global>
@coveralls
Copy link

coveralls commented Feb 19, 2024

Pull Request Test Coverage Report for Build 7962225437

Details

  • -4 of 17 (76.47%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.2%) to 93.722%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/domain/alerts/alerts.repository.ts 12 16 75.0%
Totals Coverage Status
Change from base Build 7960435326: -0.2%
Covered Lines: 6153
Relevant Lines: 6347

💛 - Coveralls

@fmrsabino fmrsabino merged commit 2baa536 into main Feb 20, 2024
16 checks passed
@fmrsabino fmrsabino deleted the send-unsubscription-substitution branch February 20, 2024 12:18
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.

3 participants