Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/services/NotificationsSchedulerService.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ async function getProjectWithId (projectId) {

/**
* extract the members of projects and build recipients list out of them
* we can use `email` to identify recipients
* we can use `userId` to identify recipients
* @param project the project
* @returns {string[]} array of recipients
*/
function buildProjectTeamRecipients (project) {
const recipients = _.unionBy(_.map(project.members, m => _.pick(m, 'email')), 'email')
const recipients = _.unionBy(_.map(project.members, m => _.pick(m, 'userId')), 'userId')
if (_.isEmpty(recipients)) {
localLogger.error(`No recipients for projectId:${project.id}`, 'buildProjectTeamRecipients')
}
Expand Down