]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - scripts/update-host.ts
Add AP fetch tests
[github/Chocobozzz/PeerTube.git] / scripts / update-host.ts
index 1dc19664d66ae6900929bfc968eb8f81cf5fce52..422a3c9a7df16926e3c0724fa74232780f2ffe8a 100755 (executable)
@@ -4,7 +4,7 @@ import { VideoModel } from '../server/models/video/video'
 import { ActorModel } from '../server/models/activitypub/actor'
 import {
   getAccountActivityPubUrl,
-  getAnnounceActivityPubUrl,
+  getVideoAnnounceActivityPubUrl,
   getVideoActivityPubUrl, getVideoChannelActivityPubUrl,
   getVideoCommentActivityPubUrl
 } from '../server/lib/activitypub'
@@ -78,7 +78,7 @@ async function run () {
 
     console.log('Updating video share ' + videoShare.url)
 
-    videoShare.url = getAnnounceActivityPubUrl(videoShare.Video.url, videoShare.Actor)
+    videoShare.url = getVideoAnnounceActivityPubUrl(videoShare.Actor, videoShare.Video)
     await videoShare.save()
   }