X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Fvideo%2Fvideo-comment.ts;h=f84c1880c6a564fc11c61959514450e25e121e3c;hb=8e0fd45e14993793c64e06682a4a05c29068d398;hp=86766a5d1edc841c49139e966fe0ac9ae8443bcb;hpb=9a4a9b6c4e193739d542f73ee85cd305067f2aea;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/models/video/video-comment.ts b/server/models/video/video-comment.ts index 86766a5d1..f84c1880c 100644 --- a/server/models/video/video-comment.ts +++ b/server/models/video/video-comment.ts @@ -108,6 +108,9 @@ enum ScopeNames { { fields: [ 'url' ], unique: true + }, + { + fields: [ 'accountId' ] } ] }) @@ -153,7 +156,7 @@ export class VideoCommentModel extends Model { as: 'InReplyToVideoComment', onDelete: 'CASCADE' }) - InReplyToVideoComment: VideoCommentModel + InReplyToVideoComment: VideoCommentModel | null @ForeignKey(() => VideoModel) @Column @@ -348,7 +351,7 @@ export class VideoCommentModel extends Model { where: {}, include: [ { - attributes: [ 'name' ], + attributes: [ 'name', 'uuid' ], model: VideoModel.unscoped(), required: true }