Skip to content

Commit

Permalink
Merge pull request #169 from alkem-io/notifications-168
Browse files Browse the repository at this point in the history
Fixed wrong email payload for user removal
  • Loading branch information
Comoque1 authored Dec 15, 2022
2 parents 6b87969 + a97a7cf commit 22e5c8a
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 22e5c8a

Please sign in to comment.