mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2026-05-20 10:04:53 +00:00
🚀 Refactor: Centralize isBoardMember logic in EinundzwanzigPleb model and replace redundant checks
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user