X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Factivitypub%2Fshare.ts;h=3bece0ff72748f49d9889c82dfd803ced36d9da3;hb=594d0c6a7c64b045c11508bb4e4b19b75b3fc557;hp=1767df0aeb5b895761a01c93079f1579a54eefdd;hpb=88108880bbdba473cfe36ecbebc1c3c4f972e102;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/activitypub/share.ts b/server/lib/activitypub/share.ts index 1767df0ae..3bece0ff7 100644 --- a/server/lib/activitypub/share.ts +++ b/server/lib/activitypub/share.ts @@ -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 }) }