import { VideoModel } from '../../../models/video/video'
import { getVideoLikeActivityPubUrl } from '../url'
import {
+ audiencify,
broadcastToFollowers,
getActorsInvolvedInVideo,
getAudience,
const audience = getOriginVideoAudience(video, accountsInvolvedInVideo)
const data = await likeActivityData(url, byActor, video, t, audience)
- return unicastTo(data, byActor, video.VideoChannel.Account.Actor.sharedInboxUrl, t)
+ return unicastTo(data, byActor, video.VideoChannel.Account.Actor.sharedInboxUrl)
}
async function sendLikeToVideoFollowers (byActor: ActorModel, video: VideoModel, t: Transaction) {
audience = await getAudience(byActor, t)
}
- return {
+ return audiencify({
type: 'Like',
id: url,
actor: byActor.url,
- to: audience.to,
- cc: audience.cc,
object: video.url
- }
+ }, audience)
}
// ---------------------------------------------------------------------------