File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ workflows:
8282 - " build-dev " :
8383 filters :
8484 branches :
85- only : [dev, 'feature/discourseMigration ']
85+ only : [dev, 'feature/notification-email-improvements ']
8686 - " build-prod " :
8787 filters :
8888 branches :
Original file line number Diff line number Diff line change 22 * The configuration file.
33 */
44module . exports = {
5+ ENV : process . env . ENV ,
56 LOG_LEVEL : process . env . LOG_LEVEL ,
67 PORT : process . env . PORT ,
78 authSecret : process . env . authSecret ,
Original file line number Diff line number Diff line change @@ -91,9 +91,11 @@ function startKafkaConsumer(handlers) {
9191 userEmail = config . DEV_MODE_EMAIL ;
9292 }
9393 const recipients = [ userEmail ] ;
94- if ( notificationType === BUS_API_EVENT . EMAIL . MENTIONED_IN_POST ) {
95- recipients . push ( config . MENTION_EMAIL ) ;
94+ const cc = [ ] ;
95+ if ( eventType === BUS_API_EVENT . EMAIL . MENTIONED_IN_POST ) {
96+ cc . push ( config . MENTION_EMAIL ) ;
9697 }
98+ const categories = [ `${ config . ENV } :${ eventType } ` . toLowerCase ( ) ] ;
9799
98100 // get jwt token then encode it with base64
99101 const body = {
@@ -123,6 +125,12 @@ function startKafkaConsumer(handlers) {
123125 } ,
124126 recipients,
125127 replyTo,
128+ cc,
129+ from : {
130+ name : notification . contents . userHandle ,
131+ email :
'[email protected] ' , //TODO pick from config 132+ } ,
133+ categories,
126134 } ;
127135 // send event to bus api
128136 return service . postEvent ( {
You can’t perform that action at this time.
0 commit comments