mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-10 00:34:50 +00:00
Update DiscoverController
This commit is contained in:
parent
2810b952dd
commit
0af5547dbb
1 changed files with 8 additions and 0 deletions
|
@ -6,6 +6,7 @@ use App\Follower;
|
|||
use App\Hashtag;
|
||||
use App\Profile;
|
||||
use App\Status;
|
||||
use App\UserFilter;
|
||||
use Auth;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
|
@ -23,6 +24,13 @@ class DiscoverController extends Controller
|
|||
$following = Follower::whereProfileId($pid)
|
||||
->pluck('following_id');
|
||||
|
||||
$filtered = UserFilter::whereUserId($pid)
|
||||
->whereFilterableType('App\Profile')
|
||||
->whereIn('filter_type', ['mute', 'block'])
|
||||
->pluck('filterable_id');
|
||||
|
||||
$following = $following->push($filtered);
|
||||
|
||||
$people = Profile::inRandomOrder()
|
||||
->where('id', '!=', $pid)
|
||||
->whereNotIn('id', $following)
|
||||
|
|
Loading…
Reference in a new issue