about summary refs log tree commit diff
path: root/app/services/follow_remote_account_service.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-01-20 20:14:02 +0100
committerEugen Rochko <eugen@zeonfederated.com>2017-01-20 20:14:02 +0100
commit9bd3b11cfb7fbfc42f0ebfecf238e037d44ca39d (patch)
tree9b0b8102cf3df24f49c46ca636ac1aa8d50bf81d /app/services/follow_remote_account_service.rb
parent05abd977c1ace4931ea679059cd600ed41337a1c (diff)
Instead of refusing to create accounts, domain blocks auto-suspend new accounts from that domain
Diffstat (limited to 'app/services/follow_remote_account_service.rb')
-rw-r--r--app/services/follow_remote_account_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/follow_remote_account_service.rb b/app/services/follow_remote_account_service.rb
index f640222b0..d17cf0f45 100644
--- a/app/services/follow_remote_account_service.rb
+++ b/app/services/follow_remote_account_service.rb
@@ -14,7 +14,6 @@ class FollowRemoteAccountService < BaseService
     username, domain = uri.split('@')
 
     return Account.find_local(username) if TagManager.instance.local_domain?(domain)
-    return nil if DomainBlock.blocked?(domain)
 
     account = Account.find_remote(username, domain)
     return account unless account.nil?
@@ -41,6 +40,7 @@ class FollowRemoteAccountService < BaseService
     account.url         = data.link('http://webfinger.net/rel/profile-page').href
     account.public_key  = magic_key_to_pem(data.link('magic-public-key').href)
     account.private_key = nil
+    account.suspended   = true if DomainBlock.blocked?(domain)
 
     xml  = get_feed(account.remote_url)
     hubs = get_hubs(xml)