]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/activitypub/process/process-create.ts
Support refusing remote comments
[github/Chocobozzz/PeerTube.git] / server / lib / activitypub / process / process-create.ts
index 76ed37aae3cf266871c18ddac13c8eab6135e1da..1e6e8956ccc8e349b91946ce95efdbdf8c3fd24a 100644 (file)
@@ -109,8 +109,10 @@ async function processCreateVideoComment (activity: ActivityCreate, byActor: MAc
   let video: MVideoAccountLightBlacklistAllFiles
   let created: boolean
   let comment: MCommentOwnerVideo
+
   try {
     const resolveThreadResult = await resolveThread({ url: commentObject.id, isVideo: false })
+    if (!resolveThreadResult) return // Comment not accepted
 
     video = resolveThreadResult.video
     created = resolveThreadResult.commentCreated