]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/activitypub/send/send-view.ts
Merge branch 'master' into develop
[github/Chocobozzz/PeerTube.git] / server / lib / activitypub / send / send-view.ts
index 8809417f9b16bcf76df88ec81b0f75cd30ccc1eb..1f864ea5237d4b55c2a5a06a8185d8f3313be634 100644 (file)
@@ -5,9 +5,9 @@ import { getVideoLikeActivityPubUrl } from '../url'
 import { sendVideoRelatedActivity } from './utils'
 import { audiencify, getAudience } from '../audience'
 import { logger } from '../../../helpers/logger'
-import { MActorAudience, MVideoAccountLight, MVideoUrl } from '@server/typings/models'
+import { MActorAudience, MVideoImmutable, MVideoUrl } from '@server/typings/models'
 
-async function sendView (byActor: ActorModel, video: MVideoAccountLight, t: Transaction) {
+async function sendView (byActor: ActorModel, video: MVideoImmutable, t: Transaction) {
   logger.info('Creating job to send view of %s.', video.url)
 
   const activityBuilder = (audience: ActivityAudience) => {
@@ -16,7 +16,7 @@ async function sendView (byActor: ActorModel, video: MVideoAccountLight, t: Tran
     return buildViewActivity(url, byActor, video, audience)
   }
 
-  return sendVideoRelatedActivity(activityBuilder, { byActor, video, transaction: t })
+  return sendVideoRelatedActivity(activityBuilder, { byActor, video, transaction: t, contextType: 'View' })
 }
 
 function buildViewActivity (url: string, byActor: MActorAudience, video: MVideoUrl, audience?: ActivityAudience): ActivityView {