diff --git a/src/constants.js b/src/constants.js index 140a1b4..fb316fd 100644 --- a/src/constants.js +++ b/src/constants.js @@ -47,7 +47,8 @@ module.exports = { }, CHALLENGE_ROLES: { COPILOT: 'Copilot', - MANAGER: 'Manager' + MANAGER: 'Manager', + SUBMITTER: 'Submitter' } }, VANILLA: { diff --git a/src/services/vanilla.js b/src/services/vanilla.js index c4f8d2f..7212846 100644 --- a/src/services/vanilla.js +++ b/src/services/vanilla.js @@ -335,9 +335,10 @@ function shouldWatchCategories (projectRole, challengeRoles) { return true } - // Project Copilots / Challenge Copilots + // Project Copilots / Challenge Copilots and Submitters return (projectRole === constants.TOPCODER.PROJECT_ROLES.COPILOT || - (_.isArray(challengeRoles) && _.includes(challengeRoles, constants.TOPCODER.CHALLENGE_ROLES.COPILOT)) + (_.isArray(challengeRoles) && (_.includes(challengeRoles, constants.TOPCODER.CHALLENGE_ROLES.COPILOT) || + _.includes(challengeRoles, constants.TOPCODER.CHALLENGE_ROLES.SUBMITTER))) ) } @@ -353,11 +354,12 @@ function shouldFollowCategories (projectRole, challengeRoles) { return true } - // Project Copilots or Managers / Challenge Copilots and Managers + // Project Copilots or Managers / Challenge Copilots, Managers and Submitters return projectRole === constants.TOPCODER.PROJECT_ROLES.COPILOT || projectRole === constants.TOPCODER.PROJECT_ROLES.MANAGER || (_.isArray(challengeRoles) && (_.includes(challengeRoles, constants.TOPCODER.CHALLENGE_ROLES.COPILOT) || - _.includes(challengeRoles, constants.TOPCODER.CHALLENGE_ROLES.MANAGER)) + _.includes(challengeRoles, constants.TOPCODER.CHALLENGE_ROLES.MANAGER) || + _.includes(challengeRoles, constants.TOPCODER.CHALLENGE_ROLES.SUBMITTER)) ) }