From 1c105a6ce3ae7866678a124054da15dc0d21e47b Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 30 Jul 2023 00:49:23 -0600 Subject: [PATCH] Update ProfileController, allow albums in atom feed. Closes #4561. Fixes #4526 --- app/Http/Controllers/ProfileController.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index df25b2d7..26e9e539 100644 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -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 &&