]> cat aescling's git repositories - mastodon.git/commitdiff
Re-enable Webfinger for locked accounts but don't handle "follow" events
authorEugen Rochko <eugen@zeonfederated.com>
Thu, 22 Dec 2016 22:17:57 +0000 (23:17 +0100)
committerEugen Rochko <eugen@zeonfederated.com>
Thu, 22 Dec 2016 22:17:57 +0000 (23:17 +0100)
coming in via Salmon.

Currently no way to prevent remote follows, but they will only receive public
and unlisted posts

app/controllers/xrd_controller.rb
app/services/process_interaction_service.rb
config/locales/simple_form.en.yml

index c3c38063c1047a1e97bba3ee3a07ca3bd7ba36e3..9e0277860775734266cd7601560c837e16f4d0ff 100644 (file)
@@ -13,7 +13,7 @@ class XrdController < ApplicationController
   end
 
   def webfinger
-    @account = Account.where(locked: false).find_local!(username_from_resource)
+    @account = Account.find_local!(username_from_resource)
     @canonical_account_uri = "acct:#{@account.username}@#{Rails.configuration.x.local_domain}"
     @magic_key = pem_to_magic_key(@account.keypair.public_key)
 
index 4e54876819236f31b4cc8a7339e4cecc5c91f21a..3d3cccb6a9ca2d7f194dcd7d48c883f1afd58cb9 100644 (file)
@@ -30,7 +30,7 @@ class ProcessInteractionService < BaseService
 
       case verb(xml)
       when :follow
-        follow!(account, target_account)
+        follow!(account, target_account) unless target_account.locked?
       when :unfollow
         unfollow!(account, target_account)
       when :favorite
index deecff3fd878fa087ed76dcecef854bff826a928..376c72e127a88eb26b26084b06061fae74679968 100644 (file)
@@ -26,7 +26,7 @@ en:
         reblog: Send e-mail when someone reblogs your status
     hints:
       defaults:
-        locked: Requires you to approve followers, defaults post privacy to followers-only and disables federation
+        locked: Requires you to approve followers and defaults post privacy to followers-only
     'no': 'No'
     required:
       mark: "*"