aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/notifier.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-07-24 15:05:51 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-07-31 11:35:19 +0200
commitedbc9325462ddf4536775871ebc25e06f46612d1 (patch)
tree9671dd51303e75d48d4f4f9a1df7a1960e33780d /server/lib/notifier.ts
parent20516920d2b72c8a18bc24b9740f7176aa962da2 (diff)
downloadPeerTube-edbc9325462ddf4536775871ebc25e06f46612d1.tar.gz
PeerTube-edbc9325462ddf4536775871ebc25e06f46612d1.tar.zst
PeerTube-edbc9325462ddf4536775871ebc25e06f46612d1.zip
Add server API to abuse messages
Diffstat (limited to 'server/lib/notifier.ts')
-rw-r--r--server/lib/notifier.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/lib/notifier.ts b/server/lib/notifier.ts
index c567e1c20..8f165d2fd 100644
--- a/server/lib/notifier.ts
+++ b/server/lib/notifier.ts
@@ -10,7 +10,7 @@ import {
10} from '@server/types/models/user' 10} from '@server/types/models/user'
11import { MVideoBlacklistLightVideo, MVideoBlacklistVideo } from '@server/types/models/video/video-blacklist' 11import { MVideoBlacklistLightVideo, MVideoBlacklistVideo } from '@server/types/models/video/video-blacklist'
12import { MVideoImportVideo } from '@server/types/models/video/video-import' 12import { MVideoImportVideo } from '@server/types/models/video/video-import'
13import { Abuse } from '@shared/models' 13import { UserAbuse } from '@shared/models'
14import { UserNotificationSettingValue, UserNotificationType, UserRight } from '../../shared/models/users' 14import { UserNotificationSettingValue, UserNotificationType, UserRight } from '../../shared/models/users'
15import { VideoPrivacy, VideoState } from '../../shared/models/videos' 15import { VideoPrivacy, VideoState } from '../../shared/models/videos'
16import { logger } from '../helpers/logger' 16import { logger } from '../helpers/logger'
@@ -73,7 +73,7 @@ class Notifier {
73 .catch(err => logger.error('Cannot notify mentions of comment %s.', comment.url, { err })) 73 .catch(err => logger.error('Cannot notify mentions of comment %s.', comment.url, { err }))
74 } 74 }
75 75
76 notifyOnNewAbuse (parameters: { abuse: Abuse, abuseInstance: MAbuseFull, reporter: string }): void { 76 notifyOnNewAbuse (parameters: { abuse: UserAbuse, abuseInstance: MAbuseFull, reporter: string }): void {
77 this.notifyModeratorsOfNewAbuse(parameters) 77 this.notifyModeratorsOfNewAbuse(parameters)
78 .catch(err => logger.error('Cannot notify of new abuse %d.', parameters.abuseInstance.id, { err })) 78 .catch(err => logger.error('Cannot notify of new abuse %d.', parameters.abuseInstance.id, { err }))
79 } 79 }
@@ -350,7 +350,7 @@ class Notifier {
350 } 350 }
351 351
352 private async notifyModeratorsOfNewAbuse (parameters: { 352 private async notifyModeratorsOfNewAbuse (parameters: {
353 abuse: Abuse 353 abuse: UserAbuse
354 abuseInstance: MAbuseFull 354 abuseInstance: MAbuseFull
355 reporter: string 355 reporter: string
356 }) { 356 }) {