mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2025-12-20 13:20:16 +00:00
first copies from portal
This commit is contained in:
38
app/Console/Commands/Nostr/SyncProfiles.php
Normal file
38
app/Console/Commands/Nostr/SyncProfiles.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?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());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user