From 69222afac8f8c41d90295b33f0695bbff352851e Mon Sep 17 00:00:00 2001 From: Julien Maulny Date: Fri, 15 Nov 2019 19:05:08 +0100 Subject: Soft delete video comments instead of detroy --- server/lib/video-comment.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'server/lib/video-comment.ts') 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): return thread } +function markCommentAsDeleted (comment: MCommentOwnerVideoReply): void { + comment.text = '' + comment.deletedAt = new Date() + comment.accountId = null +} + // --------------------------------------------------------------------------- export { createVideoComment, - buildFormattedCommentTree + buildFormattedCommentTree, + markCommentAsDeleted } -- cgit v1.2.3