]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/activitypub/process/process-announce.ts
Don't rehost announced video activities
[github/Chocobozzz/PeerTube.git] / server / lib / activitypub / process / process-announce.ts
index 7dafc05937bed13d989674ffdb3370f973c7f157..09f2e80f34fab1ba53c902f454e5774458c006b6 100644 (file)
@@ -43,11 +43,14 @@ async function shareVideo (actorAnnouncer: ActorModel, activity: ActivityAnnounc
 
     const share = {
       actorId: actorAnnouncer.id,
-      videoId: video.id
+      videoId: video.id,
+      url: activity.id
     }
 
     const [ , created ] = await VideoShareModel.findOrCreate({
-      where: share,
+      where: {
+        url: activity.id
+      },
       defaults: share,
       transaction: t
     })