File tree 3 files changed +12
-3
lines changed 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ workflows:
82
82
- " build-dev " :
83
83
filters :
84
84
branches :
85
- only : [dev, 'feature/discourseMigration ']
85
+ only : [dev, 'feature/notification-email-improvements ']
86
86
- " build-prod " :
87
87
filters :
88
88
branches :
Original file line number Diff line number Diff line change 2
2
* The configuration file.
3
3
*/
4
4
module . exports = {
5
+ ENV : process . env . ENV ,
5
6
LOG_LEVEL : process . env . LOG_LEVEL ,
6
7
PORT : process . env . PORT ,
7
8
authSecret : process . env . authSecret ,
Original file line number Diff line number Diff line change @@ -91,9 +91,11 @@ function startKafkaConsumer(handlers) {
91
91
userEmail = config . DEV_MODE_EMAIL ;
92
92
}
93
93
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 ) ;
96
97
}
98
+ const categories = [ `${ config . ENV } :${ eventType } ` . toLowerCase ( ) ] ;
97
99
98
100
// get jwt token then encode it with base64
99
101
const body = {
@@ -123,6 +125,12 @@ function startKafkaConsumer(handlers) {
123
125
} ,
124
126
recipients,
125
127
replyTo,
128
+ cc,
129
+ from : {
130
+ name : notification . contents . userHandle ,
131
+ email :
'[email protected] ' , //TODO pick from config
132
+ } ,
133
+ categories,
126
134
} ;
127
135
// send event to bus api
128
136
return service . postEvent ( {
You can’t perform that action at this time.
0 commit comments