]> cat aescling's git repositories - mastodon.git/commitdiff
Reject follow requests of blocked users (#10633)
authorThibG <thib@sitedethib.com>
Thu, 25 Apr 2019 00:47:33 +0000 (02:47 +0200)
committerEugen Rochko <eugen@zeonfederated.com>
Thu, 25 Apr 2019 00:47:33 +0000 (02:47 +0200)
app/services/block_service.rb

index 140b238df3e418dcab536a1506fa021cd9aac094..10ed470e0a3e433acb5976ce378728d816292d12 100644 (file)
@@ -6,6 +6,7 @@ class BlockService < BaseService
 
     UnfollowService.new.call(account, target_account) if account.following?(target_account)
     UnfollowService.new.call(target_account, account) if target_account.following?(account)
+    RejectFollowService.new.call(account, target_account) if target_account.requested?(account)
 
     block = account.block!(target_account)