aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-03-20 14:43:12 +0100
committerChocobozzz <me@florianbigard.com>2020-03-20 14:43:12 +0100
commit6cb556449064278bdcb1a54a7b980c2e7bc735f0 (patch)
treea3d72e90cfc6074a00cd04d5197dded12260b69e /server/lib/activitypub
parent5db4545cd2af2298ef6514dde2c36edc98ef5e33 (diff)
downloadPeerTube-6cb556449064278bdcb1a54a7b980c2e7bc735f0.tar.gz
PeerTube-6cb556449064278bdcb1a54a7b980c2e7bc735f0.tar.zst
PeerTube-6cb556449064278bdcb1a54a7b980c2e7bc735f0.zip
Fix add comment in threads with deleted comments
Diffstat (limited to 'server/lib/activitypub')
-rw-r--r--server/lib/activitypub/audience.ts2
-rw-r--r--server/lib/activitypub/send/send-create.ts3
2 files changed, 4 insertions, 1 deletions
diff --git a/server/lib/activitypub/audience.ts b/server/lib/activitypub/audience.ts
index 9933ae2b5..551d04ae3 100644
--- a/server/lib/activitypub/audience.ts
+++ b/server/lib/activitypub/audience.ts
@@ -32,6 +32,8 @@ function getVideoCommentAudience (
32 32
33 // Send to actors we reply to 33 // Send to actors we reply to
34 for (const parentComment of threadParentComments) { 34 for (const parentComment of threadParentComments) {
35 if (parentComment.isDeleted()) continue
36
35 cc.push(parentComment.Account.Actor.url) 37 cc.push(parentComment.Account.Actor.url)
36 } 38 }
37 39
diff --git a/server/lib/activitypub/send/send-create.ts b/server/lib/activitypub/send/send-create.ts
index 8bdcf6417..e2fa061e8 100644
--- a/server/lib/activitypub/send/send-create.ts
+++ b/server/lib/activitypub/send/send-create.ts
@@ -80,7 +80,8 @@ async function sendCreateVideoComment (comment: MCommentOwnerVideo, t: Transacti
80 // Add the actor that commented too 80 // Add the actor that commented too
81 actorsInvolvedInComment.push(byActor) 81 actorsInvolvedInComment.push(byActor)
82 82
83 const parentsCommentActors = threadParentComments.map(c => c.Account.Actor) 83 const parentsCommentActors = threadParentComments.filter(c => !c.isDeleted())
84 .map(c => c.Account.Actor)
84 85
85 let audience: ActivityAudience 86 let audience: ActivityAudience
86 if (isOrigin) { 87 if (isOrigin) {