mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-25 01:05:36 +00:00
Fix private pic display
This commit is contained in:
parent
2feb107154
commit
7aea7506df
1 changed files with 1 additions and 9 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue