diff --git a/packages/component-manuscript-manager/src/routes/fragmentsRecommendations/notifications/notifications.js b/packages/component-manuscript-manager/src/routes/fragmentsRecommendations/notifications/notifications.js index 71f25cbf61b3b7a165a9666bfbb0b25cca118bc9..c86bbd35a818229fbc82d1992ee27cbe9e91b00e 100644 --- a/packages/component-manuscript-manager/src/routes/fragmentsRecommendations/notifications/notifications.js +++ b/packages/component-manuscript-manager/src/routes/fragmentsRecommendations/notifications/notifications.js @@ -116,45 +116,27 @@ module.exports = { }) } - if ( - newRecommendation.recommendationType !== 'review' && - newRecommendation.recommendation !== 'return-to-handling-editor' - ) { - if (isEditorInChief || collection.status === 'revisionRequested') { - sendAuthorsEmail({ - email, - baseUrl, - titleText, - parsedFragment, - fragmentAuthors, - isEditorInChief, - subjectBaseText, - newRecommendation, - }) - } - - if (hasPeerReview(collection)) { - sendReviewersEmail({ - email, - baseUrl, - UserModel, - titleText, - fragmentHelper, - isEditorInChief, - subjectBaseText, - recommendation: newRecommendation.recommendation, - handlingEditorName: get(collection, 'handlingEditor.name', 'N/A'), - }) - - sendEiCsEmail({ - email, - baseUrl, - userHelper, - titleText, - subjectBaseText, - recommendation: newRecommendation, - }) - } + if (hasPeerReview(collection)) { + sendReviewersEmail({ + email, + baseUrl, + UserModel, + titleText, + fragmentHelper, + isEditorInChief, + subjectBaseText, + recommendation: newRecommendation.recommendation, + handlingEditorName: get(collection, 'handlingEditor.name', eicName), + }) + + sendEiCsEmail({ + email, + baseUrl, + userHelper, + titleText, + subjectBaseText, + recommendation: newRecommendation, + }) } } } diff --git a/packages/component-user-manager/src/routes/fragmentsUsers/emails/notifications.js b/packages/component-user-manager/src/routes/fragmentsUsers/emails/notifications.js index 140ec0d0fb2b05436e987618dc87e5a11aa0d95c..9a9281fa22b59b1e76db7dcb8cc8ee00b6170641 100644 --- a/packages/component-user-manager/src/routes/fragmentsUsers/emails/notifications.js +++ b/packages/component-user-manager/src/routes/fragmentsUsers/emails/notifications.js @@ -56,7 +56,7 @@ module.exports = { } const requestUser = await UserModel.find(reqUser) - if (requestUser.admin) { + if (requestUser.id !== user.id) { sendAddedToManuscriptEmail({ email, baseUrl,