Commit ab2bc5af authored by nickstiffler's avatar nickstiffler Committed by Yannis Barlas

Revision message

parent 457eb2db
......@@ -283,11 +283,29 @@ const articleRejected = async context => {
const articleRevision = async context => {
const { version } = context
const authorEmails = await getAuthorEmails(version.id)
const authorTeam = await Team.query()
.findOne({
objectId: version.id,
role: 'author',
})
.eager('users')
const authorNames = await Promise.all(
authorTeam.users.map(async author => User.getDisplayName(author)),
)
const content = `
<p>Dear ${authorNames.join(', ')}
<p>
The editors have requested revisions for your article
"${formatManuscriptTitle(version.title)}".
Your article "${formatManuscriptTitle(
version.title,
)}" has been accepted, with revisions.
</p>
<p>
We kindly ask you to address each point and summarize your changes
in the ‘Comments to Editor’ section on the platform. In order to
expedite the processing of your revised manuscript, please be as
specific as possible in your responses.
</p>
<h4>
Decision letter:
......@@ -539,6 +557,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
......@@ -546,9 +565,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