diff --git a/app/black_box/black_box.rb b/app/black_box/black_box.rb index 4f5eff0ef..172c0983d 100644 --- a/app/black_box/black_box.rb +++ b/app/black_box/black_box.rb @@ -1,8 +1,9 @@ class BlackBox def self.article_hotness_score(article) return (article.featured_number|| 10000)/10000 unless Rails.env.production? + reaction_points = article.reactions.sum(:points) FunctionCaller.new("blackbox-production-articleHotness", - {article: article, user: article.user}.to_json).call + {article: article, user: article.user}.to_json).call + reaction_points end def self.comment_quality_score(comment) diff --git a/app/models/reaction.rb b/app/models/reaction.rb index a77e4bb13..39aadf805 100644 --- a/app/models/reaction.rb +++ b/app/models/reaction.rb @@ -105,9 +105,9 @@ class Reaction < ApplicationRecord def assign_points base_points = if category == "vomit" - -25.0 + -50.0 elsif category == "thumbsdown" - -5.0 + -10.0 else 1.0 end diff --git a/app/views/articles/_user_metadata.html.erb b/app/views/articles/_user_metadata.html.erb index ed793fad9..d97242143 100644 --- a/app/views/articles/_user_metadata.html.erb +++ b/app/views/articles/_user_metadata.html.erb @@ -38,9 +38,16 @@ <% end %> <% else %> - <% if @user.email_public && @user.employer_name.present? && @user.location.present? && @user.education.present? %> + + <% if @user.email_public && + @user.employer_name.present? && + @user.location.present? && + @user.education.present? && + @user.education.size > 25 && + @user.summary.to_s.size < 145 + %> <% end %> <% if @user.email_public %>