+async function sendCreateWatchAction (stats: MLocalVideoViewerWithWatchSections, transaction: Transaction) {
+ logger.info('Creating job to send create watch action %s.', stats.url, lTags(stats.uuid))
+
+ const byActor = await getServerActor()
+
+ const activityBuilder = (audience: ActivityAudience) => {
+ return buildCreateActivity(stats.url, byActor, stats.toActivityPubObject(), audience)
+ }
+
+ return sendVideoActivityToOrigin(activityBuilder, { byActor, video: stats.Video, transaction, contextType: 'WatchAction' })
+}
+
+async function sendCreateVideoPlaylist (playlist: MVideoPlaylistFull, transaction: Transaction) {