From 2284f202070aa2e49156cc52b3b1596a7d5aadec Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 29 Jul 2019 11:59:29 +0200 Subject: Add gitlab ci support --- server/lib/activitypub/process/process-flag.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'server/lib/activitypub/process') 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, const { video } = await getOrCreateVideoAndAccountAndChannel({ videoObject: flag.object }) - return sequelizeTypescript.transaction(async t => { + const videoAbuse = await sequelizeTypescript.transaction(async t => { const videoAbuseData = { reporterAccountId: account.id, reason: flag.content, @@ -42,8 +42,10 @@ async function processCreateVideoAbuse (activity: ActivityCreate | ActivityFlag, const videoAbuseInstance = await VideoAbuseModel.create(videoAbuseData, { transaction: t }) videoAbuseInstance.Video = video - Notifier.Instance.notifyOnNewVideoAbuse(videoAbuseInstance) - logger.info('Remote abuse for video uuid %s created', flag.object) + + return videoAbuseInstance }) + + Notifier.Instance.notifyOnNewVideoAbuse(videoAbuse) } -- cgit v1.2.3