return broadcastToFollowers(createActivity, byActor, [ byActor ], t)
}
-async function sendCreateCacheFile (byActor: ActorModel, fileRedundancy: VideoRedundancyModel) {
+async function sendCreateCacheFile (byActor: ActorModel, video: VideoModel, fileRedundancy: VideoRedundancyModel) {
logger.info('Creating job to send file cache of %s.', fileRedundancy.url)
- const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(fileRedundancy.VideoFile.Video.id)
- const redundancyObject = fileRedundancy.toActivityPubObject()
-
return sendVideoRelatedCreateActivity({
byActor,
video,
url: fileRedundancy.url,
- object: redundancyObject
+ object: fileRedundancy.toActivityPubObject()
})
}