diff options
Diffstat (limited to 'server/lib/activitypub/process')
-rw-r--r-- | server/lib/activitypub/process/process-flag.ts | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/server/lib/activitypub/process/process-flag.ts b/server/lib/activitypub/process/process-flag.ts index 0b3976089..8faab051e 100644 --- a/server/lib/activitypub/process/process-flag.ts +++ b/server/lib/activitypub/process/process-flag.ts | |||
@@ -31,7 +31,7 @@ async function processCreateVideoAbuse (activity: ActivityCreate | ActivityFlag, | |||
31 | 31 | ||
32 | const { video } = await getOrCreateVideoAndAccountAndChannel({ videoObject: flag.object }) | 32 | const { video } = await getOrCreateVideoAndAccountAndChannel({ videoObject: flag.object }) |
33 | 33 | ||
34 | return sequelizeTypescript.transaction(async t => { | 34 | const videoAbuse = await sequelizeTypescript.transaction(async t => { |
35 | const videoAbuseData = { | 35 | const videoAbuseData = { |
36 | reporterAccountId: account.id, | 36 | reporterAccountId: account.id, |
37 | reason: flag.content, | 37 | reason: flag.content, |
@@ -42,8 +42,10 @@ async function processCreateVideoAbuse (activity: ActivityCreate | ActivityFlag, | |||
42 | const videoAbuseInstance = await VideoAbuseModel.create(videoAbuseData, { transaction: t }) | 42 | const videoAbuseInstance = await VideoAbuseModel.create(videoAbuseData, { transaction: t }) |
43 | videoAbuseInstance.Video = video | 43 | videoAbuseInstance.Video = video |
44 | 44 | ||
45 | Notifier.Instance.notifyOnNewVideoAbuse(videoAbuseInstance) | ||
46 | |||
47 | logger.info('Remote abuse for video uuid %s created', flag.object) | 45 | logger.info('Remote abuse for video uuid %s created', flag.object) |
46 | |||
47 | return videoAbuseInstance | ||
48 | }) | 48 | }) |
49 | |||
50 | Notifier.Instance.notifyOnNewVideoAbuse(videoAbuse) | ||
49 | } | 51 | } |