Merge commit 'eaa1f9e450' into kb_migration

This commit is contained in:
KMY 2023-07-07 07:20:37 +09:00
commit 2a813d517d
73 changed files with 987 additions and 72 deletions

View file

@ -46,6 +46,7 @@ class RemoveStatusService < BaseService
remove_from_public
remove_from_media if @status.with_media?
remove_media
decrement_references
end
@status.destroy! if permanently?
@ -123,6 +124,12 @@ class RemoveStatusService < BaseService
end
end
def decrement_references
@status.references.each do |ref|
ref.decrement_count!(:status_referred_by_count)
end
end
def remove_from_hashtags
@account.featured_tags.where(tag_id: @status.tags.map(&:id)).each do |featured_tag|
featured_tag.decrement(@status.id)