-async function buildVideoChannelAnnounceToFollowers (byAccount: AccountModel, videoChannel: VideoChannelModel, t: Transaction) {
- const url = getAnnounceActivityPubUrl(videoChannel.url, byAccount)
- const announcedActivity = await createActivityData(url, videoChannel.Account, videoChannel.toActivityPubObject(), t)
-
- const accountsToForwardView = await getAccountsInvolvedInVideoChannel(videoChannel, t)
- const audience = getObjectFollowersAudience(accountsToForwardView)
- return announceActivityData(url, byAccount, announcedActivity, t, audience)
-}
-
-async function sendVideoChannelAnnounceToFollowers (byAccount: AccountModel, videoChannel: VideoChannelModel, t: Transaction) {
- const data = await buildVideoChannelAnnounceToFollowers(byAccount, videoChannel, t)
-
- return broadcastToFollowers(data, byAccount, [ byAccount ], t)
-}
-
-async function sendVideoChannelAnnounceToOrigin (byAccount: AccountModel, videoChannel: VideoChannelModel, t: Transaction) {
- const url = getAnnounceActivityPubUrl(videoChannel.url, byAccount)
- const announcedActivity = await createActivityData(url, videoChannel.Account, videoChannel.toActivityPubObject(), t)
-
- const accountsInvolvedInVideo = await getAccountsInvolvedInVideoChannel(videoChannel, t)
- const audience = getOriginVideoChannelAudience(videoChannel, accountsInvolvedInVideo)
- const data = await createActivityData(url, byAccount, announcedActivity, t, audience)
+async function sendVideoAnnounce (byActor: ActorModel, videoShare: VideoShareModel, video: VideoModel, t: Transaction) {
+ const data = await buildVideoAnnounce(byActor, videoShare, video, t)