aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub/video-comments.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/activitypub/video-comments.ts')
-rw-r--r--server/lib/activitypub/video-comments.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/lib/activitypub/video-comments.ts b/server/lib/activitypub/video-comments.ts
index 902d877c4..d025ed7f1 100644
--- a/server/lib/activitypub/video-comments.ts
+++ b/server/lib/activitypub/video-comments.ts
@@ -41,10 +41,10 @@ async function resolveThread (params: ResolveThreadParams): ResolveThreadResult
41 return await tryResolveThreadFromVideo(params) 41 return await tryResolveThreadFromVideo(params)
42 } 42 }
43 } catch (err) { 43 } catch (err) {
44 logger.debug('Cannot get or create account and video and channel for reply %s, fetch comment', url, { err }) 44 logger.debug('Cannot resolve thread from video %s, maybe because it was not a video', url, { err })
45 } 45 }
46 46
47 return resolveParentComment(params) 47 return resolveRemoteParentComment(params)
48} 48}
49 49
50export { 50export {
@@ -119,7 +119,7 @@ async function tryResolveThreadFromVideo (params: ResolveThreadParams) {
119 return { video, comment: resultComment, commentCreated } 119 return { video, comment: resultComment, commentCreated }
120} 120}
121 121
122async function resolveParentComment (params: ResolveThreadParams) { 122async function resolveRemoteParentComment (params: ResolveThreadParams) {
123 const { url, comments } = params 123 const { url, comments } = params
124 124
125 if (comments.length > ACTIVITY_PUB.MAX_RECURSION_COMMENTS) { 125 if (comments.length > ACTIVITY_PUB.MAX_RECURSION_COMMENTS) {
@@ -133,7 +133,7 @@ async function resolveParentComment (params: ResolveThreadParams) {
133 }) 133 })
134 134
135 if (sanitizeAndCheckVideoCommentObject(body) === false) { 135 if (sanitizeAndCheckVideoCommentObject(body) === false) {
136 throw new Error('Remote video comment JSON is not valid:' + JSON.stringify(body)) 136 throw new Error(`Remote video comment JSON ${url} is not valid:` + JSON.stringify(body))
137 } 137 }
138 138
139 const actorUrl = body.attributedTo 139 const actorUrl = body.attributedTo