-import {
- audiencify,
- broadcastToFollowers,
- getActorsInvolvedInVideo,
- getAudience,
- getObjectFollowersAudience,
- getOriginVideoAudience,
- unicastTo
-} from './misc'
-
-async function sendLikeToOrigin (byActor: ActorModel, video: VideoModel, t: Transaction) {
- const url = getVideoLikeActivityPubUrl(byActor, video)
-
- const accountsInvolvedInVideo = await getActorsInvolvedInVideo(video, t)
- const audience = getOriginVideoAudience(video, accountsInvolvedInVideo)
- const data = await likeActivityData(url, byActor, video, t, audience)
-
- return unicastTo(data, byActor, video.VideoChannel.Account.Actor.sharedInboxUrl, t)
-}
-
-async function sendLikeToVideoFollowers (byActor: ActorModel, video: VideoModel, t: Transaction) {
- const url = getVideoLikeActivityPubUrl(byActor, video)
+import { sendVideoRelatedActivity } from './utils'
+import { audiencify, getAudience } from '../audience'
+import { logger } from '../../../helpers/logger'
+import { MActor, MActorAudience, MVideoAccountLight, MVideoUrl } from '../../../types/models'