mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-24 14:03:16 +00:00
Update DiscoverController, fixes #445
This commit is contained in:
parent
6704c93650
commit
f0121d761a
1 changed files with 2 additions and 1 deletions
|
@ -23,7 +23,6 @@ class DiscoverController extends Controller
|
||||||
|
|
||||||
$following = Follower::whereProfileId($pid)
|
$following = Follower::whereProfileId($pid)
|
||||||
->pluck('following_id');
|
->pluck('following_id');
|
||||||
|
|
||||||
$filtered = UserFilter::whereUserId($pid)
|
$filtered = UserFilter::whereUserId($pid)
|
||||||
->whereFilterableType('App\Profile')
|
->whereFilterableType('App\Profile')
|
||||||
->whereIn('filter_type', ['mute', 'block'])
|
->whereIn('filter_type', ['mute', 'block'])
|
||||||
|
@ -36,10 +35,12 @@ class DiscoverController extends Controller
|
||||||
|
|
||||||
$people = Profile::inRandomOrder()
|
$people = Profile::inRandomOrder()
|
||||||
->whereNotIn('id', $following)
|
->whereNotIn('id', $following)
|
||||||
|
->whereIsPrivate(false)
|
||||||
->take(3)
|
->take(3)
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
$posts = Status::whereHas('media')
|
$posts = Status::whereHas('media')
|
||||||
|
->whereVisibility('public')
|
||||||
->where('profile_id', '!=', $pid)
|
->where('profile_id', '!=', $pid)
|
||||||
->whereNotIn('profile_id', $following)
|
->whereNotIn('profile_id', $following)
|
||||||
->orderBy('created_at', 'desc')
|
->orderBy('created_at', 'desc')
|
||||||
|
|
Loading…
Reference in a new issue