]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix video announces processing
authorChocobozzz <me@florianbigard.com>
Fri, 26 Jan 2018 16:48:41 +0000 (17:48 +0100)
committerChocobozzz <me@florianbigard.com>
Fri, 26 Jan 2018 16:48:41 +0000 (17:48 +0100)
server/lib/activitypub/videos.ts

index c9c4674d94bf9ce6019bf33dabc5cb21fe6a25f3..40e9318e3817cd0234d2e344783bd893a095acf5 100644 (file)
@@ -279,11 +279,14 @@ async function addVideoShares (instance: VideoModel, shareUrls: string[]) {
 
     const entry = {
       actorId: actor.id,
-      videoId: instance.id
+      videoId: instance.id,
+      url: shareUrl
     }
 
     await VideoShareModel.findOrCreate({
-      where: entry,
+      where: {
+        url: shareUrl
+      },
       defaults: entry
     })
   }