Refactor getRecepients method and fix serverLimitReached method in Team model

This commit is contained in:
Andras Bacsai 2024-02-25 18:22:24 +01:00
parent 1b055f0316
commit c3cfb8d23b

View File

@ -48,7 +48,6 @@ public function getRecepients($notification)
} }
return explode(',', $recipients); return explode(',', $recipients);
} }
static public function serverLimitReached() { static public function serverLimitReached() {
$serverLimit = Team::serverLimit(); $serverLimit = Team::serverLimit();
$team = currentTeam(); $team = currentTeam();
@ -57,7 +56,7 @@ static public function serverLimitReached() {
} }
static public function serverLimit() static public function serverLimit()
{ {
return data_get(Team::find(currentTeam()->id), 'limits.serverLimit', 0); return Team::find(currentTeam()->id)->limits['serverLimit'];
} }
public function limits(): Attribute public function limits(): Attribute
{ {