Skip to content
Snippets Groups Projects
Commit 623bcc2a authored by Sebastian Mihalache's avatar Sebastian Mihalache
Browse files

fix(component-helper-service): add proper user on email on submit revision

parent bf34673b
No related branches found
No related tags found
1 merge request!14Sprint #15
...@@ -465,7 +465,8 @@ class Email { ...@@ -465,7 +465,8 @@ class Email {
parsedFragment: { id, title }, parsedFragment: { id, title },
authors: { submittingAuthor: { firstName = '', lastName = '' } }, authors: { submittingAuthor: { firstName = '', lastName = '' } },
} = this } = this
const user = get(collection, 'handlingEditor', {}) const handlingEditor = get(collection, 'handlingEditor', {})
const user = await UserModel.find(handlingEditor.id)
if (!get(user, 'notifications.email.user')) return if (!get(user, 'notifications.email.user')) return
const userHelper = new User({ UserModel }) const userHelper = new User({ UserModel })
...@@ -481,7 +482,7 @@ class Email { ...@@ -481,7 +482,7 @@ class Email {
collection, collection,
eicName: `${eic.firstName} ${eic.lastName}`, eicName: `${eic.firstName} ${eic.lastName}`,
fragment: { id, authorName: `${firstName} ${lastName}`, title }, fragment: { id, authorName: `${firstName} ${lastName}`, title },
handlingEditorName: user.name || '', handlingEditorName: handlingEditor.name || '',
}, },
}) })
} }
......
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