Update StatusController, redirect status view for authed users to Metro 2.0 UI

This commit is contained in:
Daniel Supernault 2022-02-18 03:25:42 -07:00
parent c9e609a74b
commit 71dff472cc
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -31,6 +31,14 @@ class StatusController extends Controller
{ {
public function show(Request $request, $username, $id) public function show(Request $request, $username, $id)
{ {
// redirect authed users to Metro 2.0
if($request->user()) {
// unless they force static view
if(!$request->has('fs') || $request->input('fs') != '1') {
return redirect('/i/web/post/' . $id);
}
}
$user = Profile::whereNull('domain')->whereUsername($username)->firstOrFail(); $user = Profile::whereNull('domain')->whereUsername($username)->firstOrFail();
if($user->status != null) { if($user->status != null) {