diff options
Diffstat (limited to 'server/lib/video-comment.ts')
-rw-r--r-- | server/lib/video-comment.ts | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/server/lib/video-comment.ts b/server/lib/video-comment.ts index bb811bd2c..b8074e6d2 100644 --- a/server/lib/video-comment.ts +++ b/server/lib/video-comment.ts | |||
@@ -73,9 +73,16 @@ function buildFormattedCommentTree (resultList: ResultList<VideoCommentModel>): | |||
73 | return thread | 73 | return thread |
74 | } | 74 | } |
75 | 75 | ||
76 | function markCommentAsDeleted (comment: MCommentOwnerVideoReply): void { | ||
77 | comment.text = '' | ||
78 | comment.deletedAt = new Date() | ||
79 | comment.accountId = null | ||
80 | } | ||
81 | |||
76 | // --------------------------------------------------------------------------- | 82 | // --------------------------------------------------------------------------- |
77 | 83 | ||
78 | export { | 84 | export { |
79 | createVideoComment, | 85 | createVideoComment, |
80 | buildFormattedCommentTree | 86 | buildFormattedCommentTree, |
87 | markCommentAsDeleted | ||
81 | } | 88 | } |