-async function processCreateVideoAbuse (actor: ActorModel, videoAbuseToCreateData: VideoAbuseObject) {
- logger.debug('Reporting remote abuse for video %s.', videoAbuseToCreateData.object)
-
- const account = actor.Account
- if (!account) throw new Error('Cannot create dislike with the non account actor ' + actor.url)
-
- const { video } = await getOrCreateVideoAndAccountAndChannel(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)
-
- logger.info('Remote abuse for video uuid %s created', videoAbuseToCreateData.object)
- })
-}
-
-async function processCreateVideoComment (byActor: ActorModel, activity: ActivityCreate) {
- const comment = activity.object as VideoCommentObject
+async function processCreateVideoComment (activity: ActivityCreate, byActor: MActorSignature, notify: boolean) {
+ const commentObject = activity.object as VideoCommentObject