Skip to content

Commit 4f09fde

Browse files
committed
fix OPS recipients for email notifications
fix format of "recipitents"
1 parent f36704f commit 4f09fde

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/eventHandlers/InterviewEventHandler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ async function checkOverlapping (payload) {
105105
type: 'taas.notification.interviews-overlapping',
106106
details: {
107107
from: template.from,
108-
recipients: template.recipients,
108+
recipients: (template.recipients || []).map(email => ({ email })),
109109
data: {
110110
subject: template.subject,
111111
interviews,

src/eventHandlers/JobCandidateEventHandler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ async function sendJobCandidateSelectedNotification (payload) {
175175
type: 'taas.notification.job-candidate-selected',
176176
details: {
177177
from: template.from,
178-
recipients: template.recipients,
178+
recipients: (template.recipients || []).map(email => ({ email })),
179179
data,
180180
sendgridTemplateId: template.sendgridTemplateId,
181181
version: 'v3'

src/services/NotificationsSchedulerService.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ async function sendNotification (currentUser, data, webNotifications = []) {
545545
const dataCC = data.cc || []
546546
const templateCC = template.cc || []
547547
const dataRecipients = data.recipients || []
548-
const templateRecipients = template.recipients || []
548+
const templateRecipients = (template.recipients || []).map(email => ({ email }))
549549
const subjectBody = {
550550
subject: data.subject || template.subject,
551551
body: data.body || template.body

0 commit comments

Comments
 (0)