diff options
author | Chocobozzz <me@florianbigard.com> | 2018-08-10 16:54:01 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-10 16:54:01 +0200 |
commit | 268eebed921ac13a9ce0f4717f4923aa24190657 (patch) | |
tree | 52f8436968c8dcc686663ef5db8dffd7ed191d34 /server/lib | |
parent | 904a463c7792837f0a468a522a28448323e48593 (diff) | |
download | PeerTube-268eebed921ac13a9ce0f4717f4923aa24190657.tar.gz PeerTube-268eebed921ac13a9ce0f4717f4923aa24190657.tar.zst PeerTube-268eebed921ac13a9ce0f4717f4923aa24190657.zip |
Add state and moderationComment for abuses on server side
Diffstat (limited to 'server/lib')
-rw-r--r-- | server/lib/activitypub/process/process-create.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/lib/activitypub/process/process-create.ts b/server/lib/activitypub/process/process-create.ts index 6364bf135..791148919 100644 --- a/server/lib/activitypub/process/process-create.ts +++ b/server/lib/activitypub/process/process-create.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { ActivityCreate, VideoTorrentObject } from '../../../../shared' | 1 | import { ActivityCreate, VideoAbuseState, VideoTorrentObject } from '../../../../shared' |
2 | import { DislikeObject, VideoAbuseObject, ViewObject } from '../../../../shared/models/activitypub/objects' | 2 | import { DislikeObject, VideoAbuseObject, ViewObject } from '../../../../shared/models/activitypub/objects' |
3 | import { VideoCommentObject } from '../../../../shared/models/activitypub/objects/video-comment-object' | 3 | import { VideoCommentObject } from '../../../../shared/models/activitypub/objects/video-comment-object' |
4 | import { retryTransactionWrapper } from '../../../helpers/database-utils' | 4 | import { retryTransactionWrapper } from '../../../helpers/database-utils' |
@@ -112,7 +112,8 @@ async function processCreateVideoAbuse (actor: ActorModel, videoAbuseToCreateDat | |||
112 | const videoAbuseData = { | 112 | const videoAbuseData = { |
113 | reporterAccountId: account.id, | 113 | reporterAccountId: account.id, |
114 | reason: videoAbuseToCreateData.content, | 114 | reason: videoAbuseToCreateData.content, |
115 | videoId: video.id | 115 | videoId: video.id, |
116 | state: VideoAbuseState.PENDING | ||
116 | } | 117 | } |
117 | 118 | ||
118 | await VideoAbuseModel.create(videoAbuseData) | 119 | await VideoAbuseModel.create(videoAbuseData) |