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

@ -30,7 +30,7 @@ class ActivityPub::Activity::Follow < ActivityPub::Activity
follow_request = FollowRequest.create!(account: @account, target_account: target_account, uri: @json['id'])
if target_account.locked? || @account.silenced? || block_straight_follow?
if target_account.locked? || @account.silenced? || block_straight_follow? || (@account.bot? && target_account.user&.setting_lock_follow_from_bot)
LocalNotificationWorker.perform_async(target_account.id, follow_request.id, 'FollowRequest', 'follow_request')
else
AuthorizeFollowService.new.call(@account, target_account)