diff --git a/app/Jobs/StatusPipeline/StatusEntityLexer.php b/app/Jobs/StatusPipeline/StatusEntityLexer.php index a64ca7602..1c5b172b6 100644 --- a/app/Jobs/StatusPipeline/StatusEntityLexer.php +++ b/app/Jobs/StatusPipeline/StatusEntityLexer.php @@ -107,9 +107,13 @@ class StatusEntityLexer implements ShouldQueue } DB::transaction(function () use ($status, $tag) { $slug = str_slug($tag, '-', false); - $hashtag = Hashtag::firstOrCreate( - ['name' => $tag, 'slug' => $slug] - ); + $hashtag = Hashtag::where('slug', $slug)->first(); + if (!$hashtag) { + $hashtag = Hashtag::create( + ['name' => $tag, 'slug' => $slug] + ); + } + StatusHashtag::firstOrCreate( [ 'status_id' => $status->id,