diff options
Diffstat (limited to 'server/lib/activitypub')
-rw-r--r-- | server/lib/activitypub/video-comments.ts | 6 |
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 @@ | |||
1 | import { VideoCommentObject } from '../../../shared/models/activitypub/objects/video-comment-object' | 1 | import { VideoCommentObject } from '../../../shared/models/activitypub/objects/video-comment-object' |
2 | import { isVideoCommentObjectValid } from '../../helpers/custom-validators/activitypub/video-comments' | 2 | import { sanitizeAndCheckVideoCommentObject } from '../../helpers/custom-validators/activitypub/video-comments' |
3 | import { logger } from '../../helpers/logger' | 3 | import { logger } from '../../helpers/logger' |
4 | import { doRequest } from '../../helpers/requests' | 4 | import { doRequest } from '../../helpers/requests' |
5 | import { ACTIVITY_PUB } from '../../initializers' | 5 | import { 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 | ||