X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Factivitypub%2Fvideos.ts;h=40e9318e3817cd0234d2e344783bd893a095acf5;hb=8dfd8fd7ca376e7898c912bb985a7a4a997cd966;hp=c9c4674d94bf9ce6019bf33dabc5cb21fe6a25f3;hpb=0a67e28beeaf603110d52df3eda400e60531b3a4;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/activitypub/videos.ts b/server/lib/activitypub/videos.ts index c9c4674d9..40e9318e3 100644 --- a/server/lib/activitypub/videos.ts +++ b/server/lib/activitypub/videos.ts @@ -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 }) }