-import { ActorModel } from '../../../models/activitypub/actor'
-import { VideoModel } from '../../../models/video/video'
-import { getAnnounceActivityPubUrl } from '../url'
-import {
- broadcastToFollowers,
- getActorsInvolvedInVideo,
- getAudience,
- getObjectFollowersAudience,
- getOriginVideoAudience,
- unicastTo
-} from './misc'
-import { createActivityData } from './send-create'
-
-async function buildVideoAnnounceToFollowers (byActor: ActorModel, video: VideoModel, t: Transaction) {
- const url = getAnnounceActivityPubUrl(video.url, byActor)
+import { broadcastToFollowers } from './utils'
+import { audiencify, getActorsInvolvedInVideo, getAudience, getAudienceFromFollowersOf } from '../audience'
+import { logger } from '../../../helpers/logger'
+import { MActorLight, MVideo } from '../../../typings/models'
+import { MVideoShare } from '../../../typings/models/video'
+
+async function buildAnnounceWithVideoAudience (
+ byActor: MActorLight,
+ videoShare: MVideoShare,
+ video: MVideo,
+ t: Transaction
+) {