Avoid latest featured tag use on post removal unless necessary (#32787)
This commit is contained in:
parent
c634da32cf
commit
dc9a106d4c
4 changed files with 58 additions and 12 deletions
|
@ -33,7 +33,7 @@ class ProcessHashtagsService < BaseService
|
|||
|
||||
unless removed_tags.empty?
|
||||
@account.featured_tags.where(tag_id: removed_tags.map(&:id)).find_each do |featured_tag|
|
||||
featured_tag.decrement(@status.id)
|
||||
featured_tag.decrement(@status)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -115,7 +115,7 @@ class RemoveStatusService < BaseService
|
|||
|
||||
def remove_from_hashtags
|
||||
@account.featured_tags.where(tag_id: @status.tags.map(&:id)).find_each do |featured_tag|
|
||||
featured_tag.decrement(@status.id)
|
||||
featured_tag.decrement(@status)
|
||||
end
|
||||
|
||||
return unless @status.public_visibility?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue