aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/video-comment.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/video-comment.ts')
-rw-r--r--server/lib/video-comment.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/lib/video-comment.ts b/server/lib/video-comment.ts
index f88e5cfdf..70ba7c303 100644
--- a/server/lib/video-comment.ts
+++ b/server/lib/video-comment.ts
@@ -9,14 +9,14 @@ import { sendCreateVideoComment } from './activitypub/send'
9 9
10async function createVideoComment (obj: { 10async function createVideoComment (obj: {
11 text: string, 11 text: string,
12 inReplyToComment: VideoCommentModel, 12 inReplyToComment: VideoCommentModel | null,
13 video: VideoModel 13 video: VideoModel
14 account: AccountModel 14 account: AccountModel
15}, t: Sequelize.Transaction) { 15}, t: Sequelize.Transaction) {
16 let originCommentId: number = null 16 let originCommentId: number | null = null
17 let inReplyToCommentId: number = null 17 let inReplyToCommentId: number | null = null
18 18
19 if (obj.inReplyToComment) { 19 if (obj.inReplyToComment && obj.inReplyToComment !== null) {
20 originCommentId = obj.inReplyToComment.originCommentId || obj.inReplyToComment.id 20 originCommentId = obj.inReplyToComment.originCommentId || obj.inReplyToComment.id
21 inReplyToCommentId = obj.inReplyToComment.id 21 inReplyToCommentId = obj.inReplyToComment.id
22 } 22 }