Don't follow account if it's already followed (#3575)
Closes https://github.com/tootsuite/mastodon/issues/3102
This commit is contained in:
committed by
Eugen Rochko
parent
f54dca06a9
commit
037f96c5ae
@ -12,6 +12,8 @@ class FollowService < BaseService
|
||||
raise ActiveRecord::RecordNotFound if target_account.nil? || target_account.id == source_account.id || target_account.suspended?
|
||||
raise Mastodon::NotPermittedError if target_account.blocking?(source_account) || source_account.blocking?(target_account)
|
||||
|
||||
return if source_account.following?(target_account)
|
||||
|
||||
if target_account.locked?
|
||||
request_follow(source_account, target_account)
|
||||
else
|
||||
|
Reference in New Issue
Block a user