@@ -211,7 +211,7 @@ export class ExternalNotificationsService {
211211 comment : this . commentToInput ( input . comment , input . story ) ,
212212 } ;
213213
214- return await this . send ( data ) ;
214+ return await this . send ( data , input . comment . tenantID ) ;
215215 } catch ( err ) {
216216 this . logger . warn (
217217 { err, input } ,
@@ -243,7 +243,7 @@ export class ExternalNotificationsService {
243243 comment : this . commentToInput ( input . comment , input . story ) ,
244244 } ;
245245
246- return await this . send ( data ) ;
246+ return await this . send ( data , input . comment . tenantID ) ;
247247 } catch ( err ) {
248248 this . logger . warn (
249249 { err, input } ,
@@ -287,7 +287,7 @@ export class ExternalNotificationsService {
287287 try {
288288 const data = this . buildReply ( input ) ;
289289
290- return await this . send ( data ) ;
290+ return await this . send ( data , input . reply . tenantID ) ;
291291 } catch ( err ) {
292292 this . logger . warn (
293293 { err, input } ,
@@ -320,7 +320,7 @@ export class ExternalNotificationsService {
320320 try {
321321 const data = this . buildApprove ( input ) ;
322322
323- return await this . send ( data ) ;
323+ return await this . send ( data , input . comment . tenantID ) ;
324324 } catch ( err ) {
325325 this . logger . warn (
326326 { err, input } ,
@@ -353,7 +353,7 @@ export class ExternalNotificationsService {
353353 try {
354354 const data = this . buildReject ( input ) ;
355355
356- return await this . send ( data ) ;
356+ return await this . send ( data , input . comment . tenantID ) ;
357357 } catch ( err ) {
358358 this . logger . warn (
359359 { err, input } ,
@@ -380,7 +380,7 @@ export class ExternalNotificationsService {
380380 comment : this . commentToInput ( input . comment , input . story ) ,
381381 } ;
382382
383- return await this . send ( data ) ;
383+ return await this . send ( data , input . comment . tenantID ) ;
384384 } catch ( err ) {
385385 this . logger . warn (
386386 { err, input } ,
@@ -391,15 +391,15 @@ export class ExternalNotificationsService {
391391 return false ;
392392 }
393393
394- public async send ( notification : any ) {
394+ public async send ( notification : any , tenantID : string ) {
395395 if ( ! notification ) {
396396 return false ;
397397 }
398398
399- return this . sendMany ( [ notification ] ) ;
399+ return this . sendMany ( [ notification ] , tenantID ) ;
400400 }
401401
402- public async sendMany ( notifications : any [ ] ) {
402+ public async sendMany ( notifications : any [ ] , tenantID : string ) {
403403 if ( ! this . active ( ) ) {
404404 return false ;
405405 }
@@ -418,6 +418,7 @@ export class ExternalNotificationsService {
418418 headers : {
419419 "Content-Type" : "application/json" ,
420420 "x-notifications-api-key" : this . apiKey ! ,
421+ "x-notifications-coral-tenant-id" : tenantID ,
421422 } ,
422423 body : JSON . stringify ( data ) ,
423424 } ) ;
0 commit comments