forked from mirror/pixelfed
Merge pull request #4562 from pixelfed/staging
Update ProfileController, allow albums in atom feed. Closes #4561. Fi…
This commit is contained in:
commit
acadd1b473
1 changed files with 5 additions and 5 deletions
|
@ -12,6 +12,7 @@ use App\Follower;
|
|||
use App\FollowRequest;
|
||||
use App\Profile;
|
||||
use App\Story;
|
||||
use App\Status;
|
||||
use App\User;
|
||||
use App\UserSetting;
|
||||
use App\UserFilter;
|
||||
|
@ -253,15 +254,14 @@ class ProfileController extends Controller
|
|||
abort_if(!$enabled, 404);
|
||||
|
||||
$data = Cache::remember('pf:atom:user-feed:by-id:' . $profile['id'], 900, function() use($pid, $profile) {
|
||||
$items = DB::table('statuses')
|
||||
->whereProfileId($pid)
|
||||
->whereVisibility('public')
|
||||
->whereType('photo')
|
||||
$items = Status::whereProfileId($pid)
|
||||
->whereScope('public')
|
||||
->whereIn('type', ['photo', 'photo:album'])
|
||||
->orderByDesc('id')
|
||||
->take(10)
|
||||
->get()
|
||||
->map(function($status) {
|
||||
return StatusService::get($status->id);
|
||||
return StatusService::get($status->id, true);
|
||||
})
|
||||
->filter(function($status) {
|
||||
return $status &&
|
||||
|
|
Loading…
Reference in a new issue