aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/activitypub')
-rw-r--r--server/lib/activitypub/video-comments.ts10
1 files changed, 7 insertions, 3 deletions
diff --git a/server/lib/activitypub/video-comments.ts b/server/lib/activitypub/video-comments.ts
index 776a295c0..902d877c4 100644
--- a/server/lib/activitypub/video-comments.ts
+++ b/server/lib/activitypub/video-comments.ts
@@ -28,14 +28,18 @@ async function resolveThread (params: ResolveThreadParams): ResolveThreadResult
28 if (params.commentCreated === undefined) params.commentCreated = false 28 if (params.commentCreated === undefined) params.commentCreated = false
29 if (params.comments === undefined) params.comments = [] 29 if (params.comments === undefined) params.comments = []
30 30
31 // Already have this comment? 31 // If it is not a video, or if we don't know if it's a video
32 if (isVideo === false) { 32 if (isVideo === false || isVideo === undefined) {
33 const result = await resolveCommentFromDB(params) 33 const result = await resolveCommentFromDB(params)
34 if (result) return result 34 if (result) return result
35 } 35 }
36 36
37 try { 37 try {
38 if (isVideo === true) return tryResolveThreadFromVideo(params) 38 // If it is a video, or if we don't know if it's a video
39 if (isVideo === true || isVideo === undefined) {
40 // Keep await so we catch the exception
41 return await tryResolveThreadFromVideo(params)
42 }
39 } catch (err) { 43 } catch (err) {
40 logger.debug('Cannot get or create account and video and channel for reply %s, fetch comment', url, { err }) 44 logger.debug('Cannot get or create account and video and channel for reply %s, fetch comment', url, { err })
41 } 45 }