1
0
Fork 0

fix(notifier): notifyModeratorsOfNewAbuse

closes #3445
This commit is contained in:
kontrollanten 2020-12-11 06:53:30 +01:00 committed by Chocobozzz
parent 8a9e6ee4a8
commit b1771455af
1 changed files with 6 additions and 5 deletions

View File

@ -482,15 +482,16 @@ class Notifier {
return { users: moderators, settingGetter, notificationCreator, emailSender: emailSenderModerators }
}
const [ reporterOptions, moderatorsOptions ] = await Promise.all([
const options = await Promise.all([
buildReporterOptions(),
buildModeratorsOptions()
])
return Promise.all([
this.notify(reporterOptions),
this.notify(moderatorsOptions)
])
return Promise.all(
options
.filter(opt => opt)
.map(this.notify)
)
}
private async notifyModeratorsOfVideoAutoBlacklist (videoBlacklist: MVideoBlacklistLightVideo) {