]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/video/video-comment.ts
Add reason when banning a user
[github/Chocobozzz/PeerTube.git] / server / models / video / video-comment.ts
index 86766a5d1edc841c49139e966fe0ac9ae8443bcb..f84c1880c6a564fc11c61959514450e25e121e3c 100644 (file)
@@ -108,6 +108,9 @@ enum ScopeNames {
     {
       fields: [ 'url' ],
       unique: true
+    },
+    {
+      fields: [ 'accountId' ]
     }
   ]
 })
@@ -153,7 +156,7 @@ export class VideoCommentModel extends Model<VideoCommentModel> {
     as: 'InReplyToVideoComment',
     onDelete: 'CASCADE'
   })
-  InReplyToVideoComment: VideoCommentModel
+  InReplyToVideoComment: VideoCommentModel | null
 
   @ForeignKey(() => VideoModel)
   @Column
@@ -348,7 +351,7 @@ export class VideoCommentModel extends Model<VideoCommentModel> {
       where: {},
       include: [
         {
-          attributes: [ 'name' ],
+          attributes: [ 'name', 'uuid' ],
           model: VideoModel.unscoped(),
           required: true
         }