mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2025-12-14 06:36:46 +00:00
39 lines
797 B
PHP
39 lines
797 B
PHP
<?php
|
|
|
|
namespace App\Console\Commands\Nostr;
|
|
|
|
use App\Models\EinundzwanzigPleb;
|
|
use App\Traits\NostrFetcherTrait;
|
|
use Illuminate\Console\Command;
|
|
use swentel\nostr\Subscription\Subscription;
|
|
|
|
class SyncProfiles extends Command
|
|
{
|
|
use NostrFetcherTrait;
|
|
|
|
/**
|
|
* The name and signature of the console command.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $signature = 'sync:profiles';
|
|
|
|
/**
|
|
* The console command description.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $description = 'Command description';
|
|
|
|
/**
|
|
* Execute the console command.
|
|
*/
|
|
public function handle()
|
|
{
|
|
$plebs = EinundzwanzigPleb::query()
|
|
->whereDoesntHave('profile')
|
|
->get();
|
|
$this->fetchProfile($plebs->pluck('npub')->toArray());
|
|
}
|
|
}
|