From db46f7ddbba2b00cea0e5f883664909ecb62d691 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 20 Feb 2020 22:52:58 -0700 Subject: [PATCH] Update ProfileController, revert pgsql change --- app/Http/Controllers/ProfileController.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index e5f90693a..976898ff6 100644 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -22,14 +22,11 @@ class ProfileController extends Controller { public function show(Request $request, $username) { - if(config('database.default') == 'pgsql') { - $username = strtolower($username); - } - $user = Profile::whereNull('domain') ->whereNull('status') ->whereUsername($username) ->firstOrFail(); + if($request->wantsJson() && config('federation.activitypub.enabled')) { return $this->showActivityPub($request, $user); } @@ -247,6 +244,6 @@ class ProfileController extends Controller ->where('expires_at', '>', now()) ->count(); abort_unless($exists > 0, 404); - return view('profile.story', compact('pid')); + return view('profile.story', compact('pid', 'profile')); } }