- return unicastTo(data, byAccount, video.VideoChannel.Account.sharedInboxUrl, t)
-}
-
-async function sendLikeToVideoFollowers (byAccount: AccountInstance, video: VideoInstance, t: Transaction) {
- const url = getVideoLikeActivityPubUrl(byAccount, video)
-
- const accountsInvolvedInVideo = await getAccountsInvolvedInVideo(video, t)
- const audience = getObjectFollowersAudience(accountsInvolvedInVideo)
- const data = await likeActivityData(url, byAccount, video, t, audience)
-
- const followersException = [ byAccount ]
- return broadcastToFollowers(data, byAccount, accountsInvolvedInVideo, t, followersException)
-}
-
-async function likeActivityData (
- url: string,
- byAccount: AccountInstance,
- video: VideoInstance,
- t: Transaction,
- audience?: ActivityAudience
-) {
- if (!audience) {
- audience = await getAudience(byAccount, t)