Update status embed, allow photo albums. Fixes #2374

This commit is contained in:
Daniel Supernault 2020-08-10 23:33:50 -06:00
parent 3b7ff030f2
commit d11fac0dfb
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
2 changed files with 30 additions and 30 deletions

View file

@ -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');