diff options
Diffstat (limited to 'server/lib/activitypub/send/send-create.ts')
-rw-r--r-- | server/lib/activitypub/send/send-create.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/lib/activitypub/send/send-create.ts b/server/lib/activitypub/send/send-create.ts index 2fa008453..d73dd8d24 100644 --- a/server/lib/activitypub/send/send-create.ts +++ b/server/lib/activitypub/send/send-create.ts | |||
@@ -15,7 +15,7 @@ import { | |||
15 | getAudience, | 15 | getAudience, |
16 | getObjectFollowersAudience, | 16 | getObjectFollowersAudience, |
17 | getOriginVideoAudience, | 17 | getOriginVideoAudience, |
18 | getOriginVideoCommentAudience, | 18 | getVideoCommentAudience, |
19 | unicastTo | 19 | unicastTo |
20 | } from './misc' | 20 | } from './misc' |
21 | 21 | ||
@@ -47,7 +47,7 @@ async function sendCreateVideoCommentToOrigin (comment: VideoCommentModel, t: Tr | |||
47 | 47 | ||
48 | const actorsInvolvedInComment = await getActorsInvolvedInVideo(comment.Video, t) | 48 | const actorsInvolvedInComment = await getActorsInvolvedInVideo(comment.Video, t) |
49 | actorsInvolvedInComment.push(byActor) | 49 | actorsInvolvedInComment.push(byActor) |
50 | const audience = getOriginVideoCommentAudience(comment, threadParentComments, actorsInvolvedInComment) | 50 | const audience = getVideoCommentAudience(comment, threadParentComments, actorsInvolvedInComment) |
51 | 51 | ||
52 | const data = await createActivityData(comment.url, byActor, commentObject, t, audience) | 52 | const data = await createActivityData(comment.url, byActor, commentObject, t, audience) |
53 | 53 | ||
@@ -70,7 +70,7 @@ async function sendCreateVideoCommentToVideoFollowers (comment: VideoCommentMode | |||
70 | const actorsInvolvedInComment = await getActorsInvolvedInVideo(comment.Video, t) | 70 | const actorsInvolvedInComment = await getActorsInvolvedInVideo(comment.Video, t) |
71 | actorsInvolvedInComment.push(byActor) | 71 | actorsInvolvedInComment.push(byActor) |
72 | 72 | ||
73 | const audience = getOriginVideoCommentAudience(comment, threadParentComments, actorsInvolvedInComment) | 73 | const audience = getVideoCommentAudience(comment, threadParentComments, actorsInvolvedInComment, true) |
74 | const data = await createActivityData(comment.url, byActor, commentObject, t, audience) | 74 | const data = await createActivityData(comment.url, byActor, commentObject, t, audience) |
75 | 75 | ||
76 | // This was a reply, send it to the parent actors | 76 | // This was a reply, send it to the parent actors |
@@ -144,7 +144,7 @@ async function createActivityData ( | |||
144 | } | 144 | } |
145 | 145 | ||
146 | return audiencify({ | 146 | return audiencify({ |
147 | type: 'Create', | 147 | type: 'Create' as 'Create', |
148 | id: url + '/activity', | 148 | id: url + '/activity', |
149 | actor: byActor.url, | 149 | actor: byActor.url, |
150 | object: audiencify(object, audience) | 150 | object: audiencify(object, audience) |