🚀 Refactor: Centralize isBoardMember logic in EinundzwanzigPleb model and replace redundant checks

This commit is contained in:
HolgerHatGarKeineNode
2026-05-18 22:04:45 +02:00
parent cb61d9d543
commit 3b855e9517
14 changed files with 86 additions and 75 deletions
+6 -1
View File
@@ -9,7 +9,7 @@ class NostrUser implements Authenticatable
{
protected string $pubkey;
protected ?object $pleb;
protected ?EinundzwanzigPleb $pleb;
public function __construct(string $pubkey)
{
@@ -63,4 +63,9 @@ class NostrUser implements Authenticatable
{
return $this->pleb;
}
public function isBoardMember(): bool
{
return $this->pleb?->isBoardMember() ?? false;
}
}