From 0432da190f819a3dff569cb06491cf9c99661ca8 Mon Sep 17 00:00:00 2001 From: Ben Halpern Date: Wed, 26 Jun 2019 10:15:07 -0400 Subject: [PATCH] Tweak black box so posts won't stick (#3312) --- app/black_box/black_box.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/black_box/black_box.rb b/app/black_box/black_box.rb index eb60d0693..5ca5fb8e6 100644 --- a/app/black_box/black_box.rb +++ b/app/black_box/black_box.rb @@ -9,6 +9,9 @@ class BlackBox today_bonus = usable_date > 26.hours.ago ? 395 : 0 two_day_bonus = usable_date > 48.hours.ago ? 330 : 0 four_day_bonus = usable_date > 96.hours.ago ? 330 : 0 + if usable_date < 10.days.ago + reaction_points /= 2 # Older posts should fade + end function_caller.call("blackbox-production-articleHotness", { article: article, user: article.user }.to_json).to_i + reaction_points + recency_bonus + super_recent_bonus + super_super_recent_bonus + today_bonus + two_day_bonus + four_day_bonus