diff --git a/server/models/video/video-comment.ts b/server/models/video/video-comment.ts index 868d04ff9..ab0f05d6e 100644 --- a/server/models/video/video-comment.ts +++ b/server/models/video/video-comment.ts @@ -188,6 +188,27 @@ export class VideoCommentModel extends Model { }) as AccountModel } + if (!instance.Video) { + instance.Video = await instance.$get('Video', { + include: [ + { + model: VideoChannelModel, + include: [ + { + model: AccountModel, + include: [ + { + model: ActorModel + } + ] + } + ] + } + ], + transaction: options.transaction + }) as VideoModel + } + if (instance.isOwned()) { await sendDeleteVideoComment(instance, options.transaction) }