Skip to content

Commit 80d2bb2

Browse files
Gargronhiyuki2578
authored andcommitted
Fix tag score not being updated when the tag is trending (mastodon#11465)
1 parent 11abcc9 commit 80d2bb2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/models/trending_tags.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def increment_vote!(tag_id, at_time)
4949
else
5050
score = ((observed - expected)**2) / expected
5151
added = redis.zadd(key, score, tag_id.to_s)
52-
bump_tag_score!(tag_id) if added == 1
52+
bump_tag_score!(tag_id) if added
5353
end
5454

5555
redis.expire(key, EXPIRE_TRENDS_AFTER)

0 commit comments

Comments
 (0)