-import {
- broadcastToFollowers,
- getAccountsInvolvedInVideo,
- getAudience,
- getOriginVideoAudience,
- getObjectFollowersAudience,
- unicastTo
-} from './misc'
-
-async function sendLikeToOrigin (byAccount: AccountInstance, video: VideoInstance, t: Transaction) {
- const url = getVideoLikeActivityPubUrl(byAccount, video)
-
- const accountsInvolvedInVideo = await getAccountsInvolvedInVideo(video)
- const audience = getOriginVideoAudience(video, accountsInvolvedInVideo)
- const data = await likeActivityData(url, byAccount, video, audience)
-
- return unicastTo(data, byAccount, video.VideoChannel.Account.sharedInboxUrl, t)
-}
+import { broadcastToFollowers, unicastTo } from './utils'
+import { audiencify, getActorsInvolvedInVideo, getAudience, getObjectFollowersAudience, getVideoAudience } from '../audience'
+import { logger } from '../../../helpers/logger'