]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/activitypub/process/process-update.ts
Add ability to search video channels
[github/Chocobozzz/PeerTube.git] / server / lib / activitypub / process / process-update.ts
index 07a5ff92f1227936fb848e40d59c7461646b8d86..d2ad738a26f0414544d61e0b1d7c7396a6c4bce7 100644 (file)
@@ -7,7 +7,7 @@ import { AccountModel } from '../../../models/account/account'
 import { ActorModel } from '../../../models/activitypub/actor'
 import { VideoChannelModel } from '../../../models/video/video-channel'
 import { fetchAvatarIfExists, getOrCreateActorAndServerAndModel, updateActorAvatarInstance, updateActorInstance } from '../actor'
-import { getOrCreateVideoAndAccountAndChannel, getOrCreateVideoChannel, updateVideoFromAP } from '../videos'
+import { getOrCreateVideoAndAccountAndChannel, getOrCreateVideoChannelFromVideoObject, updateVideoFromAP } from '../videos'
 import { sanitizeAndCheckVideoTorrentObject } from '../../../helpers/custom-validators/activitypub/videos'
 
 async function processUpdateActivity (activity: ActivityUpdate) {
@@ -40,7 +40,7 @@ async function processUpdateVideo (actor: ActorModel, activity: ActivityUpdate)
   }
 
   const { video } = await getOrCreateVideoAndAccountAndChannel(videoObject.id)
-  const channelActor = await getOrCreateVideoChannel(videoObject)
+  const channelActor = await getOrCreateVideoChannelFromVideoObject(videoObject)
 
   return updateVideoFromAP(video, videoObject, actor, channelActor, activity.to)
 }