diff options
Diffstat (limited to 'server/lib/activitypub/process/process-delete.ts')
-rw-r--r-- | server/lib/activitypub/process/process-delete.ts | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/server/lib/activitypub/process/process-delete.ts b/server/lib/activitypub/process/process-delete.ts index 44f6a87b0..1d2279df5 100644 --- a/server/lib/activitypub/process/process-delete.ts +++ b/server/lib/activitypub/process/process-delete.ts | |||
@@ -16,7 +16,6 @@ import { | |||
16 | MChannelActor, | 16 | MChannelActor, |
17 | MCommentOwnerVideo | 17 | MCommentOwnerVideo |
18 | } from '../../../types/models' | 18 | } from '../../../types/models' |
19 | import { markCommentAsDeleted } from '../../video-comment' | ||
20 | import { forwardVideoRelatedActivity } from '../send/utils' | 19 | import { forwardVideoRelatedActivity } from '../send/utils' |
21 | 20 | ||
22 | async function processDeleteActivity (options: APProcessorOptions<ActivityDelete>) { | 21 | async function processDeleteActivity (options: APProcessorOptions<ActivityDelete>) { |
@@ -139,11 +138,9 @@ function processDeleteVideoComment (byActor: MActorSignature, videoComment: MCom | |||
139 | throw new Error(`Account ${byActor.url} does not own video comment ${videoComment.url} or video ${videoComment.Video.url}`) | 138 | throw new Error(`Account ${byActor.url} does not own video comment ${videoComment.url} or video ${videoComment.Video.url}`) |
140 | } | 139 | } |
141 | 140 | ||
142 | await sequelizeTypescript.transaction(async t => { | 141 | videoComment.markAsDeleted() |
143 | markCommentAsDeleted(videoComment) | ||
144 | 142 | ||
145 | await videoComment.save() | 143 | await videoComment.save({ transaction: t }) |
146 | }) | ||
147 | 144 | ||
148 | if (videoComment.Video.isOwned()) { | 145 | if (videoComment.Video.isOwned()) { |
149 | // Don't resend the activity to the sender | 146 | // Don't resend the activity to the sender |