@@ -339,11 +339,12 @@ const handler = (topic, message, logger, callback) => {
339
339
getNotificationsForMentionedUser ( eventConfig , message . postContent ) ,
340
340
getProjectMembersNotifications ( eventConfig , project ) ,
341
341
getTopCoderMembersNotifications ( eventConfig ) ,
342
- ] ) . then ( ( notificationsPerSource ) => (
342
+ ] ) . then ( ( notificationsPerSource ) => {
343
343
// first found notification for one user will be send, the rest ignored
344
344
// NOTE all userId has to be string
345
- _ . uniqBy ( _ . flatten ( notificationsPerSource ) , 'userId' )
346
- ) ) . then ( ( notifications ) => (
345
+ logger . debug ( 'all notifications: ' , notificationsPerSource ) ;
346
+ return _ . uniqBy ( _ . flatten ( notificationsPerSource ) , 'userId' )
347
+ } ) . then ( ( notifications ) => (
347
348
excludeNotifications ( notifications , eventConfig , message , {
348
349
project,
349
350
} )
@@ -353,7 +354,7 @@ const handler = (topic, message, logger, callback) => {
353
354
if ( eventConfig . includeUsers && message [ eventConfig . includeUsers ] && message [ eventConfig . includeUsers ] . length > 0 ) {
354
355
allNotifications = _ . filter ( allNotifications , notification => message [ eventConfig . includeUsers ] . includes ( notification . userId ) ) ;
355
356
}
356
-
357
+ logger . debug ( 'filtered notifications: ' , allNotifications ) ;
357
358
// now let's retrieve some additional data
358
359
359
360
// if message has userId such messages will likely need userHandle and user full name
0 commit comments