mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-23 21:43:17 +00:00
Update AccountController
This commit is contained in:
parent
fa99ab79c3
commit
c40b4f5cfd
1 changed files with 2 additions and 6 deletions
|
@ -205,12 +205,10 @@ class AccountController extends Controller
|
|||
|
||||
$pid = $user->id;
|
||||
Cache::remember("user:filter:list:$pid", 1440, function() use($pid) {
|
||||
$private = Profile::whereIsPrivate(true)->where('id', '!=', $pid)->pluck('id');
|
||||
$filters = UserFilter::whereUserId($pid)
|
||||
return UserFilter::whereUserId($pid)
|
||||
->whereFilterableType('App\Profile')
|
||||
->whereIn('filter_type', ['mute', 'block'])
|
||||
->pluck('filterable_id')->toArray();
|
||||
return array_merge($private->toArray(), $filters);
|
||||
});
|
||||
|
||||
return redirect()->back();
|
||||
|
@ -259,12 +257,10 @@ class AccountController extends Controller
|
|||
|
||||
$pid = $user->id;
|
||||
Cache::remember("user:filter:list:$pid", 1440, function() use($pid) {
|
||||
$private = Profile::whereIsPrivate(true)->where('id', '!=', $pid)->pluck('id');
|
||||
$filters = UserFilter::whereUserId($pid)
|
||||
return UserFilter::whereUserId($pid)
|
||||
->whereFilterableType('App\Profile')
|
||||
->whereIn('filter_type', ['mute', 'block'])
|
||||
->pluck('filterable_id')->toArray();
|
||||
return array_merge($private->toArray(), $filters);
|
||||
});
|
||||
return redirect()->back();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue