-async function sendVideoAbuse (byActor: ActorModel, videoAbuse: VideoAbuseModel, video: VideoModel, t: Transaction) {
- const url = getVideoAbuseActivityPubUrl(videoAbuse)
-
- const audience = { to: [ video.VideoChannel.Account.Actor.url ], cc: [] }
- const data = await createActivityData(url, byActor, videoAbuse.toActivityPubObject(), t, audience)
-
- return unicastTo(data, byActor, video.VideoChannel.Account.Actor.sharedInboxUrl, t)
+async function sendCreateCacheFile (
+ byActor: MActorLight,
+ video: MVideoAccountLight,
+ fileRedundancy: MVideoRedundancyStreamingPlaylistVideo | MVideoRedundancyFileVideo
+) {
+ logger.info('Creating job to send file cache of %s.', fileRedundancy.url)
+
+ return sendVideoRelatedCreateActivity({
+ byActor,
+ video,
+ url: fileRedundancy.url,
+ object: fileRedundancy.toActivityPubObject(),
+ contextType: 'CacheFile'
+ })