Skip to content
Snippets Groups Projects

Hin 1232 send correct email to new author

Merged Tania Fecheta requested to merge HIN-1232-send-correct-email-to-newAuthor into develop
All threads resolved!
const config = require('config')
const { get, isEmpty, tail } = require('lodash')
const { get, tail } = require('lodash')
const Email = require('@pubsweet/component-email-templating')
const {
@@ -101,7 +101,7 @@ module.exports = {
if (adminOwner) {
userEmailData = tail(userEmailData)
}
userEmailData.forEach(({ author, paragraph, bodyProps }) => {
const email = new Email({
type: 'user',
@@ -149,7 +149,6 @@ module.exports = {
})
email.content.ctaText = 'CONFIRM ACCOUNT'
}
// if (isEmpty(adminOwner)) return email.sendEmail()
return email.sendEmail()
})
},