1
0
Fork 0
forked from fedi/mastodon

Fix crash in SuspendAccountWorker (#15106)

* Fix crash in SuspendAccountWorker

`follows` is an array thanks to `to_a`

* Fix code style issue

Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
This commit is contained in:
ThibG 2020-11-08 18:29:48 +01:00 committed by GitHub
parent 3134691948
commit 1e64666662
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,7 +38,7 @@ class SuspendAccountService < BaseService
[Oj.dump(serialize_payload(follow, ActivityPub::RejectFollowSerializer)), follow.target_account_id, @account.inbox_url] [Oj.dump(serialize_payload(follow, ActivityPub::RejectFollowSerializer)), follow.target_account_id, @account.inbox_url]
end end
follows.in_batches.destroy_all follows.each(&:destroy)
end end
def distribute_update_actor! def distribute_update_actor!