Skip to content

Commit

Permalink
Fixed wrong email payload for user removal
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinyanakiev committed Dec 14, 2022
1 parent 6b87969 commit a97a7cf
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/docs/diagrams/.$*
/service/coverage/*
/service/coverage-ci/*
/node_modules/*

*.log
.env
Expand Down
4 changes: 2 additions & 2 deletions service/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion service/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "alkemio-notifications",
"version": "0.6.1",
"version": "0.6.2",
"description": "Alkemio notifications service",
"author": "Alkemio Foundation",
"private": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,8 @@ export class PlatformUserRemovedNotificationBuilder

private createTemplatePayload(
eventPayload: PlatformUserRemovedEventPayload,
recipient: User,
registrant?: User
recipient: User
): PlatformUserRemovedEmailPayload {
if (!registrant) {
throw Error(
`Registrant not provided for '${NotificationEventType.PLATFORM_USER_REMOVED}' event`
);
}

const notificationPreferenceURL =
this.alkemioUrlGenerator.createUserNotificationPreferencesURL(
recipient.nameID
Expand All @@ -68,7 +61,7 @@ export class PlatformUserRemovedNotificationBuilder
emailFrom: '[email protected]',
registrant: {
displayName: eventPayload.user.displayName,
email: registrant.email,
email: eventPayload.user.email,
},
recipient: {
firstName: recipient.firstName,
Expand Down

0 comments on commit a97a7cf

Please sign in to comment.