5
3
mirror of https://github.com/tildeverse/lobsters synced 2024-06-14 21:16:37 +00:00

don't give author bump without an author link

This commit is contained in:
Peter Bhat Harkins 2018-03-14 13:41:05 -06:00
parent 7d0135ea16
commit 069a2e3b11

View File

@ -218,7 +218,7 @@ class Story < ActiveRecord::Base
# take each tag's hotness modifier into effect, and give a slight bump to # take each tag's hotness modifier into effect, and give a slight bump to
# stories submitted by the author # stories submitted by the author
base = self.tags.map{|t| t.hotness_mod }.sum + base = self.tags.map{|t| t.hotness_mod }.sum +
(self.user_is_author ? 0.25 : 0.0) ((self.user_is_author? && self.url.present?) ? 0.25 : 0.0)
# give a story's comment votes some weight, ignoring submitter's comments # give a story's comment votes some weight, ignoring submitter's comments
cpoints = self.comments. cpoints = self.comments.