]> cat aescling's git repositories - mastodon.git/commit
Fix being able to import more than allowed number of follows (#15384)
authorThibG <thib@sitedethib.com>
Sat, 26 Dec 2020 22:52:46 +0000 (23:52 +0100)
committerGitHub <noreply@github.com>
Sat, 26 Dec 2020 22:52:46 +0000 (23:52 +0100)
commitf1f96ebf02e96d21d84c52825cbac623b66488f8
treeb0185cd71c95891a5aa04f859db0e213d66f32f3
parent4580129c987371b656a8ab19feba09fb98f9fac1
Fix being able to import more than allowed number of follows (#15384)

* Fix being able to import more than allowed number of follows

Without this commit, if someone tries importing a second list of accounts to
follow before the first one has been processed, this will queue imports for
the two whole lists, even if they exceed the account's allowed number of
outgoing follows.

This commit changes it so the individual queued imports aren't exempt from
the follow limit check (they remain exempt from the rate-limiting check
though).

* Catch validation errors to not re-queue failed follows

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
app/models/concerns/account_interactions.rb
app/models/concerns/follow_limitable.rb [new file with mode: 0644]
app/models/follow.rb
app/models/follow_request.rb
app/services/follow_service.rb
app/workers/authorize_follow_worker.rb
app/workers/import/relationship_worker.rb
app/workers/refollow_worker.rb
app/workers/unfollow_follow_worker.rb
lib/mastodon/accounts_cli.rb
spec/workers/refollow_worker_spec.rb