mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-26 16:23:16 +00:00
This commit is contained in:
parent
6c36995083
commit
1c105a6ce3
1 changed files with 5 additions and 5 deletions
|
@ -12,6 +12,7 @@ use App\Follower;
|
||||||
use App\FollowRequest;
|
use App\FollowRequest;
|
||||||
use App\Profile;
|
use App\Profile;
|
||||||
use App\Story;
|
use App\Story;
|
||||||
|
use App\Status;
|
||||||
use App\User;
|
use App\User;
|
||||||
use App\UserSetting;
|
use App\UserSetting;
|
||||||
use App\UserFilter;
|
use App\UserFilter;
|
||||||
|
@ -253,15 +254,14 @@ class ProfileController extends Controller
|
||||||
abort_if(!$enabled, 404);
|
abort_if(!$enabled, 404);
|
||||||
|
|
||||||
$data = Cache::remember('pf:atom:user-feed:by-id:' . $profile['id'], 900, function() use($pid, $profile) {
|
$data = Cache::remember('pf:atom:user-feed:by-id:' . $profile['id'], 900, function() use($pid, $profile) {
|
||||||
$items = DB::table('statuses')
|
$items = Status::whereProfileId($pid)
|
||||||
->whereProfileId($pid)
|
->whereScope('public')
|
||||||
->whereVisibility('public')
|
->whereIn('type', ['photo', 'photo:album'])
|
||||||
->whereType('photo')
|
|
||||||
->orderByDesc('id')
|
->orderByDesc('id')
|
||||||
->take(10)
|
->take(10)
|
||||||
->get()
|
->get()
|
||||||
->map(function($status) {
|
->map(function($status) {
|
||||||
return StatusService::get($status->id);
|
return StatusService::get($status->id, true);
|
||||||
})
|
})
|
||||||
->filter(function($status) {
|
->filter(function($status) {
|
||||||
return $status &&
|
return $status &&
|
||||||
|
|
Loading…
Reference in a new issue