}
}
-function getOriginVideoCommentAudience (
+function getVideoCommentAudience (
videoComment: VideoCommentModel,
threadParentComments: VideoCommentModel[],
actorsInvolvedInVideo: ActorModel[],
function getObjectFollowersAudience (actorsInvolvedInObject: ActorModel[]) {
return {
- to: actorsInvolvedInObject.map(a => a.followersUrl),
+ to: [ ACTIVITY_PUB.PUBLIC ].concat(actorsInvolvedInObject.map(a => a.followersUrl)),
cc: []
}
}
}
async function getAudience (actorSender: ActorModel, t: Transaction, isPublic = true) {
- const followerInboxUrls = await actorSender.getFollowerSharedInboxUrls(t)
-
- return buildAudience(followerInboxUrls, isPublic)
+ return buildAudience([ actorSender.followersUrl ], isPublic)
}
function buildAudience (followerInboxUrls: string[], isPublic = true) {
return { to, cc }
}
-function audiencify (object: any, audience: ActivityAudience) {
+function audiencify <T> (object: T, audience: ActivityAudience) {
return Object.assign(object, audience)
}
getObjectFollowersAudience,
forwardActivity,
audiencify,
- getOriginVideoCommentAudience,
+ getVideoCommentAudience,
computeUris,
broadcastToActors
}