Fix private pic display

This commit is contained in:
Simounet 2018-12-08 13:43:17 +01:00
parent 2feb107154
commit 7aea7506df
1 changed files with 1 additions and 9 deletions

View File

@ -161,6 +161,7 @@ class PublicApiController extends Controller
switch ($status->scope) {
case 'public':
case 'unlisted':
case 'private':
$user = Auth::check() ? Auth::user() : false;
if($user && $profile->is_private) {
$follows = Follower::whereProfileId($user->profile->id)
@ -172,15 +173,6 @@ class PublicApiController extends Controller
}
break;
case 'private':
$follows = Follower::whereProfileId($user->profile->id)
->whereFollowingId($profile->id)
->exists();
if($follows == false && $profile->id !== $user->profile->id) {
abort(404);
}
break;
case 'direct':
abort(404);
break;