Skip to content

Commit

Permalink
bugfix(website): do not remove newsletter suppression after donation (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mkue authored Jun 21, 2024
1 parent 31b6eaf commit 8d3de2d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion functions/src/webhooks/stripe/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ const addContributorToNewsletter = async (contributionRef: DocumentReference<Con
email: user.get('email'),
country: user.get('country') as CountryCode,
language: user.get('language') === 'de' ? 'de' : 'en',
status: 'subscribed',
isContributor: true,
});
};
Expand Down
3 changes: 2 additions & 1 deletion shared/src/sendgrid/SendgridSubscriptionClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ export class SendgridSubscriptionClient extends Client {

if (data.status === 'subscribed') {
await this.removeSuppression(data.email);
} else {
}
if (data.status === 'unsubscribed') {
await this.addSuppression(data.email);
}
};
Expand Down

0 comments on commit 8d3de2d

Please sign in to comment.