Commit 5fbdfdcd authored by nickstiffler's avatar nickstiffler
Browse files

fix(notifications): expanded email for author revision

parent 979eae02
......@@ -290,10 +290,12 @@ const articleRevision = async context => {
})
.eager('users')
const authorNames = authorTeam.map(author => author.displayName).join(', ')
const authorNames = await Promise.all(
authorTeam.users.map(async author => User.getDisplayName(author)),
)
const content = `
<p>Dear ${authorNames}
<p>Dear ${authorNames.join(', ')}
<p>
Your article has been accepted, with revisions.
</p>
......@@ -553,6 +555,7 @@ const initialSubmission = async context => {
const editorEmails = await getEditorEmails()
const { version } = context
const currentUser = await getCurrentUser(context)
const name = await currentUser.displayName
/**
* Send email to editors that there is a new submission
......@@ -560,9 +563,9 @@ const initialSubmission = async context => {
const content = `
<p>There has been a new submission!</p>
<p>
User ${
currentUser.displayName
} just submitted article "${formatManuscriptTitle(version.title)}".
User ${name} just submitted article "${formatManuscriptTitle(
version.title,
)}".
</p>
${getArticleLink(version.manuscriptId)}
`
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment