diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-05-19 21:05:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-19 21:05:32 +0200 |
commit | f1ab70649b00e717a00ac295d42ff99160aa713b (patch) | |
tree | 283147302494a44af53409ca71736ffc1bd6eda1 /app/services/process_interaction_service.rb | |
parent | 1548695c8300618d44efa8785f5c6eb7b3a86917 (diff) |
Add buttons to block and unblock domain (#3127)
* Add buttons to block and unblock domain
* Relationship API now returns "domain_blocking" status for accounts,
rename "block entire domain" to "hide entire domain", fix unblocking domain,
do not block notifications from domain-blocked-but-followed people, do
not send Salmons to domain blocked users
* Add test
* Personal domain blocks shouldn't affect Salmon after all, since in this
direction of communication the control is very thin when it comes to
public stuff. Best stay consistent and not affect federation in this way
* Ignore followers and follow request from domain blocked folks,
ensure account domain blocks are not created for empty domain,
and avoid duplicates in validation
* Purge followers when blocking domain (without soft-blocks, since they
are useless here)
* Add tests, fix local timeline being empty when having any domain blocks
Diffstat (limited to 'app/services/process_interaction_service.rb')
-rw-r--r-- | app/services/process_interaction_service.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/process_interaction_service.rb b/app/services/process_interaction_service.rb index bc8361510c7..e9c01103d58 100644 --- a/app/services/process_interaction_service.rb +++ b/app/services/process_interaction_service.rb @@ -21,9 +21,9 @@ class ProcessInteractionService < BaseService case verb(xml) when :follow - follow!(account, target_account) unless target_account.locked? || target_account.blocking?(account) + follow!(account, target_account) unless target_account.locked? || target_account.blocking?(account) || target_account.domain_blocking?(account.domain) when :request_friend - follow_request!(account, target_account) unless !target_account.locked? || target_account.blocking?(account) + follow_request!(account, target_account) unless !target_account.locked? || target_account.blocking?(account) || target_account.domain_blocking?(account.domain) when :authorize authorize_follow_request!(account, target_account) when :reject |