Add emoji_reactions_count_per_account

This commit is contained in:
KMY 2023-04-14 10:20:15 +09:00
parent 1efc51313d
commit fed859a7d6
5 changed files with 28 additions and 13 deletions

View file

@ -97,7 +97,7 @@ class Trends::Statuses < Trends::Base
def calculate_scores(statuses, at_time)
items = statuses.map do |status|
expected = 1.0
observed = (status.reblogs_count + status.favourites_count + status.emoji_reactions_count * 0.3).to_f
observed = (status.reblogs_count + status.favourites_count + status.emoji_reactions_count_per_account * 0.8).to_f
score = if expected > observed || observed < options[:threshold]
0