mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-26 01:36:43 +00:00
Update PublicApiController, fix private account statuses api. Closes #2995
This commit is contained in:
parent
0107e8fd68
commit
aa2dd26c1b
1 changed files with 2 additions and 1 deletions
|
@ -382,6 +382,7 @@ class PublicApiController extends Controller
|
||||||
->filter(function($s) use($filtered) {
|
->filter(function($s) use($filtered) {
|
||||||
return in_array($s['account']['id'], $filtered) == false;
|
return in_array($s['account']['id'], $filtered) == false;
|
||||||
})
|
})
|
||||||
|
->values()
|
||||||
->toArray();
|
->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -734,7 +735,7 @@ class PublicApiController extends Controller
|
||||||
$following = Follower::whereProfileId($pid)->pluck('following_id');
|
$following = Follower::whereProfileId($pid)->pluck('following_id');
|
||||||
return $following->push($pid)->toArray();
|
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 {
|
} else {
|
||||||
if($user) {
|
if($user) {
|
||||||
$pid = $user->profile_id;
|
$pid = $user->profile_id;
|
||||||
|
|
Loading…
Reference in a new issue