From 71dff472cc955dde913db57a8c65e2ab71268e1f Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Fri, 18 Feb 2022 03:25:42 -0700 Subject: [PATCH] Update StatusController, redirect status view for authed users to Metro 2.0 UI --- app/Http/Controllers/StatusController.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/Http/Controllers/StatusController.php b/app/Http/Controllers/StatusController.php index edea1ea1e..1940390d5 100644 --- a/app/Http/Controllers/StatusController.php +++ b/app/Http/Controllers/StatusController.php @@ -31,6 +31,14 @@ class StatusController extends Controller { 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(); if($user->status != null) {