Fix reblogs being discarded after the reblogged status (#19731)
This commit is contained in:
parent
e02812d5b6
commit
c2170991c7
6 changed files with 12 additions and 6 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue