diff --git a/packages/component-invite/src/helpers/User.js b/packages/component-invite/src/helpers/User.js index d64a9d9a9f9f29ccf7059d5fbb097eb12cc8e6ef..e36c2f90c278d5e248d0d9c30e68f1f8514497b3 100644 --- a/packages/component-invite/src/helpers/User.js +++ b/packages/component-invite/src/helpers/User.js @@ -80,17 +80,18 @@ const setupReviewerDecisionEmailData = async ({ timestamp, }, }) - await mailService.sendNotificationEmail({ - toEmail: user.email, - user, - emailType: 'reviewer-thank-you', - meta: { - collection: { customId: collection.customId, id: collection.id }, - fragment: { id, title, authorName }, - handlingEditorName: collection.handlingEditor.name, - baseUrl, - }, - }) + if (agree) + await mailService.sendNotificationEmail({ + toEmail: user.email, + user, + emailType: 'reviewer-thank-you', + meta: { + collection: { customId: collection.customId, id: collection.id }, + fragment: { id, title, authorName }, + handlingEditorName: collection.handlingEditor.name, + baseUrl, + }, + }) } const setupReviewerUnassignEmail = async ({