From a429d961872a5a433e84f605acb89693f94324e6 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 10 Nov 2019 20:42:30 -0700 Subject: [PATCH 1/2] Update FollowerController --- app/Http/Controllers/FollowerController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/FollowerController.php b/app/Http/Controllers/FollowerController.php index b3b6b2e4a..f19790809 100644 --- a/app/Http/Controllers/FollowerController.php +++ b/app/Http/Controllers/FollowerController.php @@ -53,7 +53,7 @@ class FollowerController extends Controller $isFollowing = Follower::whereProfileId($user->id)->whereFollowingId($target->id)->exists(); - if($private == true && $isFollowing == 0 && $remote == true) { + if($private == true && $isFollowing == 0) { if($user->following()->count() >= Follower::MAX_FOLLOWING) { abort(400, 'You cannot follow more than ' . Follower::MAX_FOLLOWING . ' accounts'); } @@ -69,7 +69,7 @@ class FollowerController extends Controller if($remote == true && config('federation.activitypub.remoteFollow') == true) { $this->sendFollow($user, $target); } - } elseif ($isFollowing == 0) { + } elseif ($private == false && $isFollowing == 0) { if($user->following()->count() >= Follower::MAX_FOLLOWING) { abort(400, 'You cannot follow more than ' . Follower::MAX_FOLLOWING . ' accounts'); } From d4b50a24ae078678a3b766d8afbae062de5a3c2b Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 10 Nov 2019 20:43:27 -0700 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e4b6a051c..8ef6a45c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,7 @@ - Updated Status view, added ```video``` open graph tag support ([#1799](https://github.com/pixelfed/pixelfed/pull/1799)) - Updated AccountTransformer, added ```local``` attribute ([d2a90f11](https://github.com/pixelfed/pixelfed/commit/d2a90f11)) - Updated Laravel framework from v5.8 to v6.x ([3aff6de33](https://github.com/pixelfed/pixelfed/commit/3aff6de33)) +- Updated FollowerController to fix bug affecting private profiles ([a429d961](https://github.com/pixelfed/pixelfed/commit/a429d961)) ## Deprecated