From b9b84e6fa4168a4419c69ddbf3b2fd51d63518c6 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 27 Dec 2020 18:15:10 -0700 Subject: [PATCH] Update Follower model, increase hourly limit from 30 to 150 --- app/Follower.php | 2 +- app/Http/Controllers/Api/BaseApiController.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Follower.php b/app/Follower.php index d6d1d69aa..9ec6d9f65 100644 --- a/app/Follower.php +++ b/app/Follower.php @@ -10,7 +10,7 @@ class Follower extends Model protected $fillable = ['profile_id', 'following_id', 'local_profile']; const MAX_FOLLOWING = 7500; - const FOLLOW_PER_HOUR = 30; + const FOLLOW_PER_HOUR = 150; public function actor() { diff --git a/app/Http/Controllers/Api/BaseApiController.php b/app/Http/Controllers/Api/BaseApiController.php index 686c5dbca..b06d4f71a 100644 --- a/app/Http/Controllers/Api/BaseApiController.php +++ b/app/Http/Controllers/Api/BaseApiController.php @@ -154,7 +154,7 @@ class BaseApiController extends Controller ->orderBy('id', 'DESC') ->paginate($limit); } else { - $statuses = $statuses->whereVisibility('public')->orderBy('id', 'desc')->paginate($limit); + $statuses = $statuses->whereScope('public')->orderBy('id', 'desc')->paginate($limit); } $resource = new Fractal\Resource\Collection($statuses, new StatusTransformer()); $res = $this->fractal->createData($resource)->toArray();