diff --git a/app/Jobs/LikePipeline/LikePipeline.php b/app/Jobs/LikePipeline/LikePipeline.php index dc4080d7..7dbd71da 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) {