File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -122,16 +122,17 @@ module.exports = (app, logger) => {
122122 logger . debug ( 'receive PROJECT_MEMBER_ADDED event' ) ;
123123
124124 let eventType ;
125- switch ( member . role ) {
126- case PROJECT_MEMBER_ROLE . MANAGER :
127- eventType = BUS_API_EVENT . MEMBER_JOINED_MANAGER ;
128- break ;
129- case PROJECT_MEMBER_ROLE . COPILOT :
130- eventType = BUS_API_EVENT . MEMBER_JOINED_COPILOT ;
131- break ;
132- default :
133- eventType = BUS_API_EVENT . MEMBER_JOINED ;
134- break ;
125+ if ( [
126+ PROJECT_MEMBER_ROLE . MANAGER ,
127+ PROJECT_MEMBER_ROLE . PROJECT_MANAGER ,
128+ PROJECT_MEMBER_ROLE . PROGRAM_MANAGER ,
129+ PROJECT_MEMBER_ROLE . SOLUTION_ARCHITECT ,
130+ ] . includes ( member . role ) ) {
131+ eventType = BUS_API_EVENT . MEMBER_JOINED_MANAGER ;
132+ } else if ( member . role === PROJECT_MEMBER_ROLE . COPILOT ) {
133+ eventType = BUS_API_EVENT . MEMBER_JOINED_COPILOT ;
134+ } else {
135+ eventType = BUS_API_EVENT . MEMBER_JOINED ;
135136 }
136137 const projectId = _ . parseInt ( req . params . projectId ) ;
137138
You can’t perform that action at this time.
0 commit comments