diff --git a/packages/pds/src/api/com/atproto/temp/importRepo.ts b/packages/pds/src/api/com/atproto/temp/importRepo.ts index 40502811819..29d9021e942 100644 --- a/packages/pds/src/api/com/atproto/temp/importRepo.ts +++ b/packages/pds/src/api/com/atproto/temp/importRepo.ts @@ -159,6 +159,14 @@ const importBlob = async ( endpoint: string, blob: BlobRef, ) => { + const hasBlob = await actorStore.db.db + .selectFrom('blob') + .selectAll() + .where('cid', '=', blob.ref.toString()) + .executeTakeFirst() + if (hasBlob) { + return + } const res = await axios.get(endpoint, { params: { did: actorStore.repo.did, cid: blob.ref.toString() }, decompress: true,