Add block from bot follow settings

This commit is contained in:
KMY 2023-09-18 18:10:53 +09:00
parent 214092b517
commit ff994d78fa
12 changed files with 208 additions and 13 deletions

View file

@ -36,7 +36,7 @@ class FollowService < BaseService
# and the feeds are being merged
mark_home_feed_as_partial! if @source_account.not_following_anyone?
if (@target_account.locked? && !@options[:bypass_locked]) || @source_account.silenced? || @target_account.activitypub?
if (@target_account.locked? && !@options[:bypass_locked]) || @source_account.silenced? || @target_account.activitypub? || (@source_account.bot? && @target_account.user&.setting_lock_follow_from_bot)
request_follow!
elsif @target_account.local?
direct_follow!