X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Factivitypub%2Fprocess%2Fprocess-delete.ts;h=ac0e7e235aaeb4e116188c06c662448bbd1fe008;hb=2b621ac0ebe83693bba6354b3482a03ba58143e7;hp=44f6a87b0698e4343888dd19d3a1d6655d41d952;hpb=9cc4b9c61f4caa7414420f1c11ba4380c516a7a2;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/activitypub/process/process-delete.ts b/server/lib/activitypub/process/process-delete.ts index 44f6a87b0..ac0e7e235 100644 --- a/server/lib/activitypub/process/process-delete.ts +++ b/server/lib/activitypub/process/process-delete.ts @@ -16,8 +16,7 @@ import { MChannelActor, MCommentOwnerVideo } from '../../../types/models' -import { markCommentAsDeleted } from '../../video-comment' -import { forwardVideoRelatedActivity } from '../send/utils' +import { forwardVideoRelatedActivity } from '../send/shared/send-utils' async function processDeleteActivity (options: APProcessorOptions) { const { activity, byActor } = options @@ -139,11 +138,9 @@ function processDeleteVideoComment (byActor: MActorSignature, videoComment: MCom throw new Error(`Account ${byActor.url} does not own video comment ${videoComment.url} or video ${videoComment.Video.url}`) } - await sequelizeTypescript.transaction(async t => { - markCommentAsDeleted(videoComment) + videoComment.markAsDeleted() - await videoComment.save() - }) + await videoComment.save({ transaction: t }) if (videoComment.Video.isOwned()) { // Don't resend the activity to the sender