* Add: #591 リモート保留中アカウントからメンションが来た場合にuriを記録し、承認時にフェッチしに行く処理 * Rename fetch_remove_status_worker.rb to fetch_remote_status_worker.rb * Wip * Add lock code
This commit is contained in:
parent
b2acc7dbb8
commit
2ab9ea642a
22 changed files with 307 additions and 15 deletions
|
@ -298,14 +298,19 @@ class Account < ApplicationRecord
|
|||
end
|
||||
|
||||
def approve_remote!
|
||||
return unless remote_pending
|
||||
|
||||
update!(remote_pending: false)
|
||||
unsuspend!
|
||||
EnableFollowRequestsWorker.perform_async(id)
|
||||
ActivateRemoteAccountWorker.perform_async(id)
|
||||
end
|
||||
|
||||
def reject_remote!
|
||||
return unless remote_pending
|
||||
|
||||
update!(remote_pending: false, suspension_origin: :local)
|
||||
pending_follow_requests.destroy_all
|
||||
pending_statuses.destroy_all
|
||||
suspend!
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue