diff options
Diffstat (limited to 'server/lib/activitypub/process')
-rw-r--r-- | server/lib/activitypub/process/process-flag.ts | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/server/lib/activitypub/process/process-flag.ts b/server/lib/activitypub/process/process-flag.ts index 40d07558c..7ed409d0e 100644 --- a/server/lib/activitypub/process/process-flag.ts +++ b/server/lib/activitypub/process/process-flag.ts | |||
@@ -49,13 +49,12 @@ async function processCreateAbuse (activity: ActivityCreate | ActivityFlag, byAc | |||
49 | logger.debug('Reporting remote abuse for object %s.', uri) | 49 | logger.debug('Reporting remote abuse for object %s.', uri) |
50 | 50 | ||
51 | await sequelizeTypescript.transaction(async t => { | 51 | await sequelizeTypescript.transaction(async t => { |
52 | 52 | const video = await VideoModel.loadByUrlAndPopulateAccount(uri, t) | |
53 | const video = await VideoModel.loadByUrlAndPopulateAccount(uri) | ||
54 | let videoComment: MCommentOwnerVideo | 53 | let videoComment: MCommentOwnerVideo |
55 | let flaggedAccount: MAccountDefault | 54 | let flaggedAccount: MAccountDefault |
56 | 55 | ||
57 | if (!video) videoComment = await VideoCommentModel.loadByUrlAndPopulateAccountAndVideo(uri) | 56 | if (!video) videoComment = await VideoCommentModel.loadByUrlAndPopulateAccountAndVideo(uri, t) |
58 | if (!videoComment) flaggedAccount = await AccountModel.loadByUrl(uri) | 57 | if (!videoComment) flaggedAccount = await AccountModel.loadByUrl(uri, t) |
59 | 58 | ||
60 | if (!video && !videoComment && !flaggedAccount) { | 59 | if (!video && !videoComment && !flaggedAccount) { |
61 | logger.warn('Cannot flag unknown entity %s.', object) | 60 | logger.warn('Cannot flag unknown entity %s.', object) |