]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/activitypub/share.ts
Fix HLS federation
[github/Chocobozzz/PeerTube.git] / server / lib / activitypub / share.ts
index 1767df0aeb5b895761a01c93079f1579a54eefdd..3bece0ff72748f49d9889c82dfd803ced36d9da3 100644 (file)
@@ -54,12 +54,7 @@ async function addVideoShares (shareUrls: string[], instance: VideoModel) {
         url: shareUrl
       }
 
-      await VideoShareModel.findOrCreate({
-        where: {
-          url: shareUrl
-        },
-        defaults: entry
-      })
+      await VideoShareModel.upsert(entry)
     } catch (err) {
       logger.warn('Cannot add share %s.', shareUrl, { err })
     }