Skip to content

Commit

Permalink
Update DownloadBlobsCommand.php
Browse files Browse the repository at this point in the history
  • Loading branch information
kawax committed Dec 17, 2024
1 parent d936ef1 commit b573a20
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Console/DownloadBlobsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;
use Revolution\Bluesky\Facades\Bluesky;
use Revolution\Bluesky\Support\CBOR;
use Revolution\Bluesky\Support\CID;
use Revolution\Bluesky\Support\DidDocument;
use Revolution\Bluesky\Support\Identity;
Expand Down Expand Up @@ -84,11 +85,10 @@ public function handle(): int
->throw()
->body();

// The CID of the blob can be verified since it is a raw codec.
if (! CID::verify(data: $content, cid: $cid)) {
$this->error('Invalid cid: '.$cid);

return;
if (CID::verify(data: $content, cid: $cid, codec: CID::RAW)) {
$this->info('Verified');
} else {
$this->error('Verify failed');
}

$name = Str::slug($actor, dictionary: ['.' => '-', ':' => '-']);
Expand Down

0 comments on commit b573a20

Please sign in to comment.