aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub/process/process-flag.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-07-29 11:59:29 +0200
committerChocobozzz <me@florianbigard.com>2019-07-29 13:40:39 +0200
commit2284f202070aa2e49156cc52b3b1596a7d5aadec (patch)
tree77aeb00016734667f8ff32a98ea8b4a6ed3ca31e /server/lib/activitypub/process/process-flag.ts
parent112be80ebdf96ef6a27420c1c6a10097388731a9 (diff)
downloadPeerTube-2284f202070aa2e49156cc52b3b1596a7d5aadec.tar.gz
PeerTube-2284f202070aa2e49156cc52b3b1596a7d5aadec.tar.zst
PeerTube-2284f202070aa2e49156cc52b3b1596a7d5aadec.zip
Add gitlab ci support
Diffstat (limited to 'server/lib/activitypub/process/process-flag.ts')
-rw-r--r--server/lib/activitypub/process/process-flag.ts8
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}