]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/activitypub/send/send-view.ts
Prevent duplicated HLS playlist on transcoding
[github/Chocobozzz/PeerTube.git] / server / lib / activitypub / send / send-view.ts
index 1088bf2582d3456271ec822a966122e8400369ca..bf3451603d8c7a3f83a703de48828a27578b3e5e 100644 (file)
@@ -13,19 +13,20 @@ async function sendView (options: {
   byActor: MActorLight
   type: ViewType
   video: MVideoImmutable
+  viewerIdentifier: string
   transaction?: Transaction
 }) {
-  const { byActor, type, video, transaction } = options
+  const { byActor, type, video, viewerIdentifier, transaction } = options
 
   logger.info('Creating job to send %s of %s.', type, video.url)
 
   const activityBuilder = (audience: ActivityAudience) => {
-    const url = getLocalVideoViewActivityPubUrl(byActor, video)
+    const url = getLocalVideoViewActivityPubUrl(byActor, video, viewerIdentifier)
 
     return buildViewActivity({ url, byActor, video, audience, type })
   }
 
-  return sendVideoRelatedActivity(activityBuilder, { byActor, video, transaction, contextType: 'View' })
+  return sendVideoRelatedActivity(activityBuilder, { byActor, video, transaction, contextType: 'View', parallelizable: true })
 }
 
 // ---------------------------------------------------------------------------