]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/video/video-comment.ts
Translated using Weblate (Ukrainian)
[github/Chocobozzz/PeerTube.git] / server / models / video / video-comment.ts
index e1faf2b9acf70ae4f0d4f354bdebed480577a1e0..c89279c65e443b5e9e11c7a62d566ecb9dbb7496 100644 (file)
@@ -585,7 +585,7 @@ export class VideoCommentModel extends Model<Partial<AttributesOnly<VideoComment
 
     if (accountId) {
       whereAnd.push({
-        [Op.eq]: accountId
+        accountId
       })
     }
 
@@ -739,6 +739,12 @@ export class VideoCommentModel extends Model<Partial<AttributesOnly<VideoComment
     return this.Account.isOwned()
   }
 
+  markAsDeleted () {
+    this.text = ''
+    this.deletedAt = new Date()
+    this.accountId = null
+  }
+
   isDeleted () {
     return this.deletedAt !== null
   }