From d11fac0dfbf9173e2b678337f408dbdf6cc334c7 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 10 Aug 2020 23:33:50 -0600 Subject: [PATCH] Update status embed, allow photo albums. Fixes #2374 --- app/Http/Controllers/StatusController.php | 5 ++- resources/views/status/embed.blade.php | 55 +++++++++++------------ 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/app/Http/Controllers/StatusController.php b/app/Http/Controllers/StatusController.php index 5ec19aa25..f98fa5d63 100644 --- a/app/Http/Controllers/StatusController.php +++ b/app/Http/Controllers/StatusController.php @@ -68,7 +68,8 @@ class StatusController extends Controller public function shortcodeRedirect(Request $request, $id) { - if(strlen($id) < 5 || !Auth::check()) { + abort_if(strlen($id) < 5, 404); + if(!Auth::check()) { return redirect('/login?next='.urlencode('/' . $request->path())); } $id = HashidService::decode($id); @@ -99,7 +100,7 @@ class StatusController extends Controller ->whereNull('uri') ->whereScope('public') ->whereIsNsfw(false) - ->whereIn('type', ['photo', 'video']) + ->whereIn('type', ['photo', 'video','photo:album']) ->find($id); if(!$status) { $content = view('status.embed-removed'); diff --git a/resources/views/status/embed.blade.php b/resources/views/status/embed.blade.php index 539d9c058..265189b86 100644 --- a/resources/views/status/embed.blade.php +++ b/resources/views/status/embed.blade.php @@ -63,36 +63,32 @@ @endif @break - @case('album') - @if($status->is_nsfw) - - @else -