0
0
Fork 0

Add "locked" flag to accounts, prevent blocked users from following, force-unfollow blocked users

This commit is contained in:
Eugen Rochko 2016-12-22 21:34:19 +01:00
parent f91b6fa9e1
commit 2d2154ba75
9 changed files with 27 additions and 3 deletions

View file

@ -5,7 +5,10 @@ class BlockService < BaseService
return if account.id == target_account.id
UnfollowService.new.call(account, target_account) if account.following?(target_account)
UnfollowService.new.call(target_account, account) if target_account.following?(account)
account.block!(target_account)
clear_timelines(account, target_account)
clear_notifications(account, target_account)
end