aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib')
-rw-r--r--server/lib/emailer.ts2
-rw-r--r--server/lib/notifier.ts8
-rw-r--r--server/lib/user.ts2
3 files changed, 7 insertions, 5 deletions
diff --git a/server/lib/emailer.ts b/server/lib/emailer.ts
index e821aea5f..a5664408d 100644
--- a/server/lib/emailer.ts
+++ b/server/lib/emailer.ts
@@ -320,7 +320,7 @@ class Emailer {
320 const commentUrl = WEBSERVER.URL + comment.Video.getWatchStaticPath() + ';threadId=' + comment.getThreadId() 320 const commentUrl = WEBSERVER.URL + comment.Video.getWatchStaticPath() + ';threadId=' + comment.getThreadId()
321 321
322 emailPayload = { 322 emailPayload = {
323 template: 'comment-abuse-new', 323 template: 'video-comment-abuse-new',
324 to, 324 to,
325 subject: `New comment abuse report from ${reporter}`, 325 subject: `New comment abuse report from ${reporter}`,
326 locals: { 326 locals: {
diff --git a/server/lib/notifier.ts b/server/lib/notifier.ts
index 40cff66d2..969e393fa 100644
--- a/server/lib/notifier.ts
+++ b/server/lib/notifier.ts
@@ -18,7 +18,7 @@ import { CONFIG } from '../initializers/config'
18import { AccountBlocklistModel } from '../models/account/account-blocklist' 18import { AccountBlocklistModel } from '../models/account/account-blocklist'
19import { UserModel } from '../models/account/user' 19import { UserModel } from '../models/account/user'
20import { UserNotificationModel } from '../models/account/user-notification' 20import { UserNotificationModel } from '../models/account/user-notification'
21import { MAbuseFull, MAbuseVideo, MAccountServer, MActorFollowFull } from '../types/models' 21import { MAbuseFull, MAccountServer, MActorFollowFull } from '../types/models'
22import { MCommentOwnerVideo, MVideoAccountLight, MVideoFullLight } from '../types/models/video' 22import { MCommentOwnerVideo, MVideoAccountLight, MVideoFullLight } from '../types/models/video'
23import { isBlockedByServerOrAccount } from './blocklist' 23import { isBlockedByServerOrAccount } from './blocklist'
24import { Emailer } from './emailer' 24import { Emailer } from './emailer'
@@ -359,12 +359,14 @@ class Notifier {
359 const moderators = await UserModel.listWithRight(UserRight.MANAGE_ABUSES) 359 const moderators = await UserModel.listWithRight(UserRight.MANAGE_ABUSES)
360 if (moderators.length === 0) return 360 if (moderators.length === 0) return
361 361
362 const url = abuseInstance.VideoAbuse?.Video?.url || abuseInstance.VideoCommentAbuse?.VideoComment?.url 362 const url = abuseInstance.VideoAbuse?.Video?.url ||
363 abuseInstance.VideoCommentAbuse?.VideoComment?.url ||
364 abuseInstance.FlaggedAccount.Actor.url
363 365
364 logger.info('Notifying %s user/moderators of new abuse %s.', moderators.length, url) 366 logger.info('Notifying %s user/moderators of new abuse %s.', moderators.length, url)
365 367
366 function settingGetter (user: MUserWithNotificationSetting) { 368 function settingGetter (user: MUserWithNotificationSetting) {
367 return user.NotificationSetting.videoAbuseAsModerator 369 return user.NotificationSetting.abuseAsModerator
368 } 370 }
369 371
370 async function notificationCreator (user: MUserWithNotificationSetting) { 372 async function notificationCreator (user: MUserWithNotificationSetting) {
diff --git a/server/lib/user.ts b/server/lib/user.ts
index 43eef8ab1..642549879 100644
--- a/server/lib/user.ts
+++ b/server/lib/user.ts
@@ -133,7 +133,7 @@ function createDefaultUserNotificationSettings (user: MUserId, t: Transaction |
133 newCommentOnMyVideo: UserNotificationSettingValue.WEB, 133 newCommentOnMyVideo: UserNotificationSettingValue.WEB,
134 myVideoImportFinished: UserNotificationSettingValue.WEB, 134 myVideoImportFinished: UserNotificationSettingValue.WEB,
135 myVideoPublished: UserNotificationSettingValue.WEB, 135 myVideoPublished: UserNotificationSettingValue.WEB,
136 videoAbuseAsModerator: UserNotificationSettingValue.WEB | UserNotificationSettingValue.EMAIL, 136 abuseAsModerator: UserNotificationSettingValue.WEB | UserNotificationSettingValue.EMAIL,
137 videoAutoBlacklistAsModerator: UserNotificationSettingValue.WEB | UserNotificationSettingValue.EMAIL, 137 videoAutoBlacklistAsModerator: UserNotificationSettingValue.WEB | UserNotificationSettingValue.EMAIL,
138 blacklistOnMyVideo: UserNotificationSettingValue.WEB | UserNotificationSettingValue.EMAIL, 138 blacklistOnMyVideo: UserNotificationSettingValue.WEB | UserNotificationSettingValue.EMAIL,
139 newUserRegistration: UserNotificationSettingValue.WEB, 139 newUserRegistration: UserNotificationSettingValue.WEB,