-async function processCreateVideoAbuse (byActor: ActorModel, videoAbuseToCreateData: VideoAbuseObject) {
- logger.debug('Reporting remote abuse for video %s.', videoAbuseToCreateData.object)
-
- const account = byActor.Account
- if (!account) throw new Error('Cannot create dislike with the non account actor ' + byActor.url)
-
- const { video } = await getOrCreateVideoAndAccountAndChannel({ videoObject: videoAbuseToCreateData.object })
-
- return sequelizeTypescript.transaction(async t => {
- const videoAbuseData = {
- reporterAccountId: account.id,
- reason: videoAbuseToCreateData.content,
- videoId: video.id,
- state: VideoAbuseState.PENDING
- }
-
- await VideoAbuseModel.create(videoAbuseData, { transaction: t })
-
- logger.info('Remote abuse for video uuid %s created', videoAbuseToCreateData.object)
- })
-}
-
-async function processCreateVideoComment (byActor: ActorModel, activity: ActivityCreate) {
+async function processCreateVideoComment (activity: ActivityCreate, byActor: MActorSignature, notify: boolean) {