aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib')
-rw-r--r--server/lib/activitypub/video-comments.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/lib/activitypub/video-comments.ts b/server/lib/activitypub/video-comments.ts
index 8ab0cdba4..60c9179a6 100644
--- a/server/lib/activitypub/video-comments.ts
+++ b/server/lib/activitypub/video-comments.ts
@@ -1,5 +1,5 @@
1import { VideoCommentObject } from '../../../shared/models/activitypub/objects/video-comment-object' 1import { VideoCommentObject } from '../../../shared/models/activitypub/objects/video-comment-object'
2import { isVideoCommentObjectValid } from '../../helpers/custom-validators/activitypub/video-comments' 2import { sanitizeAndCheckVideoCommentObject } from '../../helpers/custom-validators/activitypub/video-comments'
3import { logger } from '../../helpers/logger' 3import { logger } from '../../helpers/logger'
4import { doRequest } from '../../helpers/requests' 4import { doRequest } from '../../helpers/requests'
5import { ACTIVITY_PUB } from '../../initializers' 5import { ACTIVITY_PUB } from '../../initializers'
@@ -52,7 +52,7 @@ async function addVideoComment (videoInstance: VideoModel, commentUrl: string) {
52 activityPub: true 52 activityPub: true
53 }) 53 })
54 54
55 if (isVideoCommentObjectValid(body) === false) { 55 if (sanitizeAndCheckVideoCommentObject(body) === false) {
56 logger.debug('Remote video comment JSON is not valid.', { body }) 56 logger.debug('Remote video comment JSON is not valid.', { body })
57 return undefined 57 return undefined
58 } 58 }
@@ -123,7 +123,7 @@ async function resolveThread (url: string, comments: VideoCommentModel[] = []) {
123 activityPub: true 123 activityPub: true
124 }) 124 })
125 125
126 if (isVideoCommentObjectValid(body) === false) { 126 if (sanitizeAndCheckVideoCommentObject(body) === false) {
127 throw new Error('Remote video comment JSON is not valid :' + JSON.stringify(body)) 127 throw new Error('Remote video comment JSON is not valid :' + JSON.stringify(body))
128 } 128 }
129 129