Record deleted(by mod) status to prevent re-appear (#10732)
* Record deleted(by mod) status to prevent re-appear * Move to Tombstone * Add missing migration script
This commit is contained in:
parent
09eea46631
commit
ce8635605c
4 changed files with 15 additions and 7 deletions
|
@ -35,6 +35,7 @@ class Form::StatusBatch
|
|||
def delete_statuses
|
||||
Status.where(id: status_ids).reorder(nil).find_each do |status|
|
||||
RemovalWorker.perform_async(status.id)
|
||||
Tombstone.find_or_create_by(uri: status.uri, account: status.account, by_moderator: true)
|
||||
log_action :destroy, status
|
||||
end
|
||||
|
||||
|
|
|
@ -4,11 +4,12 @@
|
|||
#
|
||||
# Table name: tombstones
|
||||
#
|
||||
# id :bigint(8) not null, primary key
|
||||
# account_id :bigint(8)
|
||||
# uri :string not null
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# id :bigint(8) not null, primary key
|
||||
# account_id :bigint(8)
|
||||
# uri :string not null
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# by_moderator :boolean
|
||||
#
|
||||
|
||||
class Tombstone < ApplicationRecord
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue