From aa2dd26c1b9bf6bced3c905883c88c46276e3e61 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 3 Nov 2021 19:40:46 -0600 Subject: [PATCH] Update PublicApiController, fix private account statuses api. Closes #2995 --- app/Http/Controllers/PublicApiController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/PublicApiController.php b/app/Http/Controllers/PublicApiController.php index db3cc17bb..d76a42171 100644 --- a/app/Http/Controllers/PublicApiController.php +++ b/app/Http/Controllers/PublicApiController.php @@ -382,6 +382,7 @@ class PublicApiController extends Controller ->filter(function($s) use($filtered) { return in_array($s['account']['id'], $filtered) == false; }) + ->values() ->toArray(); } @@ -734,7 +735,7 @@ class PublicApiController extends Controller $following = Follower::whereProfileId($pid)->pluck('following_id'); return $following->push($pid)->toArray(); }); - $visibility = true == in_array($profile->id, $following) ? ['public', 'unlisted', 'private'] : []; + $visibility = true == in_array($profile['id'], $following) ? ['public', 'unlisted', 'private'] : []; } else { if($user) { $pid = $user->profile_id;