Skip to content

Commit

Permalink
feat: pass notification details to sendgrid
Browse files Browse the repository at this point in the history
  • Loading branch information
scopsy committed Jun 22, 2023
1 parent 78aa769 commit 457391f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,11 @@ export class SendMessageEmail extends SendMessageBase {
attachments,
id: message._id,
replyTo: replyToAddress,
notificationDetails: {
transactionId: command.transactionId,
workflowIdentifier: command.identifier,
subscriberId: subscriber.subscriberId,
},
},
overrides || {}
);
Expand Down
4 changes: 4 additions & 0 deletions providers/sendgrid/src/lib/sendgrid.provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ export class SendgridEmailProvider implements IEmailProvider {
substitutions: {},
customArgs: {
id: options.id,
novuTransactionId: options.notificationDetails?.transactionId,
novuMessageId: options.id,
novuWorkflowIdentifier: options.notificationDetails?.workflowIdentifier,
novuSubscriberId: options.notificationDetails?.subscriberId,
},
attachments: options.attachments?.map((attachment) => {
return {
Expand Down

0 comments on commit 457391f

Please sign in to comment.