🔧 refactor(NostrFetcher): simplify filter assignment and add condition to fetch profiles only if available

This commit is contained in:
fsociety
2024-10-16 16:40:55 +02:00
parent a2eb39e61e
commit af91859a4d
2 changed files with 4 additions and 4 deletions

View File

@@ -32,6 +32,8 @@ class SyncProfiles extends Command
$plebs = EinundzwanzigPleb::query()
->whereDoesntHave('profile')
->get();
$this->fetchProfile($plebs->pluck('npub')->toArray());
if ($plebs->count() > 0) {
$this->fetchProfile($plebs->pluck('npub')->toArray());
}
}
}