about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-02-11 21:16:23 +0100
committerGitHub <noreply@github.com>2022-02-11 21:16:23 +0100
commita27729ee48aab4d75d562c2007b9967333c65d29 (patch)
treea25d5d25ff6bfdfa441028605bb187bcde623306
parenta131f06e1299e21372f8f002c7959e54128be270 (diff)
Change reblogs to not count towards hashtag trends anymore (#17501)
-rw-r--r--app/models/trends/tags.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/app/models/trends/tags.rb b/app/models/trends/tags.rb
index a425fd207..2ea4550df 100644
--- a/app/models/trends/tags.rb
+++ b/app/models/trends/tags.rb
@@ -11,12 +11,9 @@ class Trends::Tags < Trends::Base
   }
 
   def register(status, at_time = Time.now.utc)
-    original_status = status.reblog? ? status.reblog : status
+    return unless !status.reblog? && status.public_visibility? && !status.account.silenced?
 
-    return unless original_status.public_visibility? && status.public_visibility? &&
-                  !original_status.account.silenced? && !status.account.silenced?
-
-    original_status.tags.each do |tag|
+    status.tags.each do |tag|
       add(tag, status.account_id, at_time) if tag.usable?
     end
   end