perlsky is a Perl 5 implementation of an AT Protocol Personal Data Server.
13
fork

Configure Feed

Select the types of activity you want to include in your feed.

Reuse blob count in account status

alice 98491088 13cae222

+3 -2
+3 -2
lib/ATProto/PDS/API/Server.pm
··· 209 209 my (undef, $account) = require_auth($c, audience => 'access'); 210 210 my $car = $c->store->repo_car($account->{did}); 211 211 my $block_count = 0; 212 + my $blob_count = 0 + $c->store->count_blobs_by_did($account->{did}); 212 213 $block_count = scalar @{ read_car($car)->{blocks} } if defined $car && length $car; 213 214 return { 214 215 activated => (!defined($account->{deactivated_at}) && !defined($account->{deleted_at})) ··· 220 221 repoBlocks => 0 + $block_count, 221 222 indexedRecords => 0 + $c->store->count_records_by_did($account->{did}), 222 223 privateStateValues => 0, 223 - expectedBlobs => 0 + $c->store->count_blobs_by_did($account->{did}), 224 - importedBlobs => 0 + $c->store->count_blobs_by_did($account->{did}), 224 + expectedBlobs => $blob_count, 225 + importedBlobs => $blob_count, 225 226 }; 226 227 }); 227 228