2
0

Fix reblogs being discarded after the reblogged status (#19731)

This commit is contained in:
Claire
2022-11-04 16:31:44 +01:00
committed by GitHub
parent e02812d5b6
commit c2170991c7
6 changed files with 12 additions and 6 deletions

View File

@@ -440,6 +440,12 @@ class Status < ApplicationRecord
im
end
def discard_with_reblogs
discard_time = Time.current
Status.unscoped.where(reblog_of_id: id, deleted_at: [nil, deleted_at]).in_batches.update_all(deleted_at: discard_time) unless reblog?
update_attribute(:deleted_at, discard_time)
end
private
def update_status_stat!(attrs)