]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/video/video-comment.ts
Refactor options in models
[github/Chocobozzz/PeerTube.git] / server / models / video / video-comment.ts
index e1faf2b9acf70ae4f0d4f354bdebed480577a1e0..e933989aec73df76dadcbe5852cd8d3a73a4ff99 100644 (file)
@@ -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
   }