+ if (byActor.Account.id !== videoComment.Account.id && byActor.Account.id !== videoComment.Video.VideoChannel.accountId) {
+ throw new Error(`Account ${byActor.url} does not own video comment ${videoComment.url} or video ${videoComment.Video.url}`)
+ }
+
+ videoComment.markAsDeleted()
+
+ await videoComment.save({ transaction: t })
+
+ if (videoComment.Video.isOwned()) {
+ // Don't resend the activity to the sender
+ const exceptions = [ byActor ]
+ await forwardVideoRelatedActivity(activity, t, exceptions, videoComment.Video)
+ }