diff options
Diffstat (limited to 'server/lib/activitypub/send/send-delete.ts')
-rw-r--r-- | server/lib/activitypub/send/send-delete.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/lib/activitypub/send/send-delete.ts b/server/lib/activitypub/send/send-delete.ts index a91756ff4..3225ebf32 100644 --- a/server/lib/activitypub/send/send-delete.ts +++ b/server/lib/activitypub/send/send-delete.ts | |||
@@ -53,16 +53,17 @@ async function sendDeleteVideoComment (videoComment: MCommentOwnerVideoReply, t: | |||
53 | : videoComment.Video.VideoChannel.Account.Actor | 53 | : videoComment.Video.VideoChannel.Account.Actor |
54 | 54 | ||
55 | const threadParentComments = await VideoCommentModel.listThreadParentComments(videoComment, t) | 55 | const threadParentComments = await VideoCommentModel.listThreadParentComments(videoComment, t) |
56 | const threadParentCommentsFiltered = threadParentComments.filter(c => !c.isDeleted()) | ||
56 | 57 | ||
57 | const actorsInvolvedInComment = await getActorsInvolvedInVideo(videoComment.Video, t) | 58 | const actorsInvolvedInComment = await getActorsInvolvedInVideo(videoComment.Video, t) |
58 | actorsInvolvedInComment.push(byActor) // Add the actor that commented the video | 59 | actorsInvolvedInComment.push(byActor) // Add the actor that commented the video |
59 | 60 | ||
60 | const audience = getVideoCommentAudience(videoComment, threadParentComments, actorsInvolvedInComment, isVideoOrigin) | 61 | const audience = getVideoCommentAudience(videoComment, threadParentCommentsFiltered, actorsInvolvedInComment, isVideoOrigin) |
61 | const activity = buildDeleteActivity(url, videoComment.url, byActor, audience) | 62 | const activity = buildDeleteActivity(url, videoComment.url, byActor, audience) |
62 | 63 | ||
63 | // This was a reply, send it to the parent actors | 64 | // This was a reply, send it to the parent actors |
64 | const actorsException = [ byActor ] | 65 | const actorsException = [ byActor ] |
65 | await broadcastToActors(activity, byActor, threadParentComments.map(c => c.Account.Actor), t, actorsException) | 66 | await broadcastToActors(activity, byActor, threadParentCommentsFiltered.map(c => c.Account.Actor), t, actorsException) |
66 | 67 | ||
67 | // Broadcast to our followers | 68 | // Broadcast to our followers |
68 | await broadcastToFollowers(activity, byActor, [ byActor ], t) | 69 | await broadcastToFollowers(activity, byActor, [ byActor ], t) |