diff options
author | Chocobozzz <me@florianbigard.com> | 2021-06-15 09:17:19 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-06-15 10:40:06 +0200 |
commit | eae0365b5c5468e51e9795b0e894815ebda86b4a (patch) | |
tree | 5da54b28c94d43d1715a0c69e35eb1cf3a1a959d /server/models/video/video-comment.ts | |
parent | 51f636ad0f928bb94069c9143e38df0518f6e4a7 (diff) | |
download | PeerTube-eae0365b5c5468e51e9795b0e894815ebda86b4a.tar.gz PeerTube-eae0365b5c5468e51e9795b0e894815ebda86b4a.tar.zst PeerTube-eae0365b5c5468e51e9795b0e894815ebda86b4a.zip |
Fix missing transactions
Diffstat (limited to 'server/models/video/video-comment.ts')
-rw-r--r-- | server/models/video/video-comment.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/server/models/video/video-comment.ts b/server/models/video/video-comment.ts index e1faf2b9a..e933989ae 100644 --- a/server/models/video/video-comment.ts +++ b/server/models/video/video-comment.ts | |||
@@ -739,6 +739,12 @@ export class VideoCommentModel extends Model<Partial<AttributesOnly<VideoComment | |||
739 | return this.Account.isOwned() | 739 | return this.Account.isOwned() |
740 | } | 740 | } |
741 | 741 | ||
742 | markAsDeleted () { | ||
743 | this.text = '' | ||
744 | this.deletedAt = new Date() | ||
745 | this.accountId = null | ||
746 | } | ||
747 | |||
742 | isDeleted () { | 748 | isDeleted () { |
743 | return this.deletedAt !== null | 749 | return this.deletedAt !== null |
744 | } | 750 | } |