From b04c7170d76e620eb9e7426f7b2b6772a8a3c499 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Fri, 14 Feb 2020 22:11:42 -0700 Subject: [PATCH] Update DiscoverController, fixes #2009 --- app/Http/Controllers/DiscoverController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/DiscoverController.php b/app/Http/Controllers/DiscoverController.php index 92d488386..fd90d2284 100644 --- a/app/Http/Controllers/DiscoverController.php +++ b/app/Http/Controllers/DiscoverController.php @@ -42,7 +42,9 @@ class DiscoverController extends Controller { abort_if(!config('instance.discover.tags.is_public') && !Auth::check(), 403); - $tag = Hashtag::whereSlug($hashtag)->firstOrFail(); + $tag = Hashtag::whereName($hashtag) + ->orWhere('slug', $hashtag) + ->firstOrFail(); $tagCount = StatusHashtagService::count($tag->id); return view('discover.tags.show', compact('tag', 'tagCount')); }