mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-25 06:23:18 +00:00
Merge pull request #626 from Simounet/fix/private-pic
Fix private pic display
This commit is contained in:
commit
9d89ad18e4
1 changed files with 1 additions and 9 deletions
|
@ -162,6 +162,7 @@ class PublicApiController extends Controller
|
||||||
switch ($status->scope) {
|
switch ($status->scope) {
|
||||||
case 'public':
|
case 'public':
|
||||||
case 'unlisted':
|
case 'unlisted':
|
||||||
|
case 'private':
|
||||||
$user = Auth::check() ? Auth::user() : false;
|
$user = Auth::check() ? Auth::user() : false;
|
||||||
if($user && $profile->is_private) {
|
if($user && $profile->is_private) {
|
||||||
$follows = Follower::whereProfileId($user->profile->id)
|
$follows = Follower::whereProfileId($user->profile->id)
|
||||||
|
@ -173,15 +174,6 @@ class PublicApiController extends Controller
|
||||||
}
|
}
|
||||||
break;
|
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':
|
case 'direct':
|
||||||
abort(404);
|
abort(404);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue