]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/activitypub/process/process-view.ts
Refactor getOrCreateAPVideo
[github/Chocobozzz/PeerTube.git] / server / lib / activitypub / process / process-view.ts
index 84697673b6ee5f1359a0b3db9b17ae91a9e1aac2..c2d41dd2845fe2e629416795eb81863e07d3e91c 100644 (file)
@@ -1,4 +1,4 @@
-import { getOrCreateVideoAndAccountAndChannel } from '../videos'
+import { getOrCreateAPVideo } from '../videos'
 import { forwardVideoRelatedActivity } from '../send/utils'
 import { Redis } from '../../redis'
 import { ActivityCreate, ActivityView, ViewObject } from '../../../../shared/models/activitypub'
@@ -29,7 +29,7 @@ async function processCreateView (activity: ActivityView | ActivityCreate, byAct
     fetchType: 'only-video' as 'only-video',
     allowRefresh: false as false
   }
-  const { video } = await getOrCreateVideoAndAccountAndChannel(options)
+  const { video } = await getOrCreateAPVideo(options)
 
   if (!video.isLive) {
     await Redis.Instance.addVideoView(video.id)