From b995af15f68dae543be43a2fb2dad5b107b8118f Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 2 Oct 2024 01:09:51 -0600 Subject: [PATCH] Update LikePipeline --- app/Jobs/LikePipeline/LikePipeline.php | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/app/Jobs/LikePipeline/LikePipeline.php b/app/Jobs/LikePipeline/LikePipeline.php index dc4080d7e..7dbd71da2 100644 --- a/app/Jobs/LikePipeline/LikePipeline.php +++ b/app/Jobs/LikePipeline/LikePipeline.php @@ -11,13 +11,11 @@ use App\Services\StatusService; use App\Transformer\ActivityPub\Verb\Like as LikeTransformer; use App\User; use App\Util\ActivityPub\Helpers; -use DB; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; -use Illuminate\Support\Lottery; use League\Fractal; use League\Fractal\Serializer\ArraySerializer; @@ -65,17 +63,6 @@ class LikePipeline implements ShouldQueue return; } - Lottery::odds(1, 20) - ->winner(function () use ($status) { - $status->likes_count = DB::table('likes')->whereStatusId($status->id)->count(); - $status->save(); - }) - ->loser(function () use ($status) { - $status->likes_count = $status->likes_count + 1; - $status->save(); - }) - ->choose(); - StatusService::refresh($status->id); if ($status->url && $actor->domain == null) {