- const videoChannel = video.VideoChannel
- const announcedActivity = await addActivityData(url, videoChannel.Account, video, videoChannel.url, video.toActivityPubObject(), t)
-
- const accountsToForwardView = await getAccountsInvolvedInVideo(video, t)
- const audience = getObjectFollowersAudience(accountsToForwardView)
- const data = await announceActivityData(url, byAccount, announcedActivity, t, audience)
-
- return data
-}
-
-async function sendVideoAnnounceToFollowers (byAccount: AccountInstance, video: VideoInstance, t: Transaction) {
- const data = await buildVideoAnnounceToFollowers(byAccount, video, t)
-
- return broadcastToFollowers(data, byAccount, [ byAccount ], t)
-}
-
-async function sendVideoAnnounceToOrigin (byAccount: AccountInstance, video: VideoInstance, t: Transaction) {
- const url = getAnnounceActivityPubUrl(video.url, byAccount)
-
- const videoChannel = video.VideoChannel
- const announcedActivity = await addActivityData(url, videoChannel.Account, video, videoChannel.url, video.toActivityPubObject(), t)
-
- const accountsInvolvedInVideo = await getAccountsInvolvedInVideo(video, t)
- const audience = getOriginVideoAudience(video, accountsInvolvedInVideo)
- const data = await createActivityData(url, byAccount, announcedActivity, t, audience)
-
- return unicastTo(data, byAccount, videoChannel.Account.sharedInboxUrl, t)
-}
-
-async function buildVideoChannelAnnounceToFollowers (byAccount: AccountInstance, videoChannel: VideoChannelInstance, t: Transaction) {
- const url = getAnnounceActivityPubUrl(videoChannel.url, byAccount)
- const announcedActivity = await createActivityData(url, videoChannel.Account, videoChannel.toActivityPubObject(), t)
-
- const accountsToForwardView = await getAccountsInvolvedInVideoChannel(videoChannel, t)