]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/activitypub/process/process-view.ts
Stronger model typings
[github/Chocobozzz/PeerTube.git] / server / lib / activitypub / process / process-view.ts
index e4997b8282a492d606e56cca6cf08d0bb3cab5d1..df29ee968b85fe7c22fd20c6eed427683fa1a2e8 100644 (file)
@@ -3,7 +3,7 @@ import { forwardVideoRelatedActivity } from '../send/utils'
 import { Redis } from '../../redis'
 import { ActivityCreate, ActivityView, ViewObject } from '../../../../shared/models/activitypub'
 import { APProcessorOptions } from '../../../typings/activitypub-processor.model'
-import { SignatureActorModel } from '../../../typings/models'
+import { MActorSignature } from '../../../typings/models'
 
 async function processViewActivity (options: APProcessorOptions<ActivityCreate | ActivityView>) {
   const { activity, byActor } = options
@@ -18,11 +18,11 @@ export {
 
 // ---------------------------------------------------------------------------
 
-async function processCreateView (activity: ActivityView | ActivityCreate, byActor: SignatureActorModel) {
+async function processCreateView (activity: ActivityView | ActivityCreate, byActor: MActorSignature) {
   const videoObject = activity.type === 'View' ? activity.object : (activity.object as ViewObject).object
 
   const options = {
-    videoObject: videoObject,
+    videoObject,
     fetchType: 'only-video' as 'only-video'
   }
   const { video } = await getOrCreateVideoAndAccountAndChannel(options)