Explorar o código

Fix posts made in the future being allowed to trend (#32996)

Claire hai 1 día
pai
achega
e68b26c8df
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      app/models/trends/statuses.rb

+ 1 - 1
app/models/trends/statuses.rb

@@ -106,7 +106,7 @@ class Trends::Statuses < Trends::Base
   private
 
   def eligible?(status)
-    status.public_visibility? && status.account.discoverable? && !status.account.silenced? && !status.account.sensitized? && status.spoiler_text.blank? && !status.sensitive? && !status.reply? && valid_locale?(status.language)
+    status.created_at.past? && status.public_visibility? && status.account.discoverable? && !status.account.silenced? && !status.account.sensitized? && status.spoiler_text.blank? && !status.sensitive? && !status.reply? && valid_locale?(status.language)
   end
 
   def calculate_scores(statuses, at_time)