about summary refs log tree commit diff
path: root/app/services/update_remote_profile_service.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-02-11 02:12:05 +0100
committerEugen Rochko <eugen@zeonfederated.com>2017-02-11 02:58:00 +0100
commit149887a0ffc81b588520ff82ab9fda8dff7bce6c (patch)
treefc1ba51d91fbadf729241381a8c46643121ad99f /app/services/update_remote_profile_service.rb
parentd551e43a9bc35b4785285e78f5ecd3157636b447 (diff)
Make follow requests federate
Diffstat (limited to 'app/services/update_remote_profile_service.rb')
-rw-r--r--app/services/update_remote_profile_service.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/services/update_remote_profile_service.rb b/app/services/update_remote_profile_service.rb
index ad9c56540..dc315db19 100644
--- a/app/services/update_remote_profile_service.rb
+++ b/app/services/update_remote_profile_service.rb
@@ -10,6 +10,7 @@ class UpdateRemoteProfileService < BaseService
     unless author_xml.nil?
       account.display_name = author_xml.at_xpath('./poco:displayName', poco: TagManager::POCO_XMLNS).content unless author_xml.at_xpath('./poco:displayName', poco: TagManager::POCO_XMLNS).nil?
       account.note         = author_xml.at_xpath('./poco:note', poco: TagManager::POCO_XMLNS).content unless author_xml.at_xpath('./poco:note', poco: TagManager::POCO_XMLNS).nil?
+      account.locked       = author_xml.at_xpath('./mastodon:scope', mastodon: TagManager::MTDN_XMLNS)&.content == 'private'
 
       unless account.suspended? || DomainBlock.find_by(domain: account.domain)&.reject_media?
         account.avatar_remote_url = author_xml.at_xpath('./xmlns:link[@rel="avatar"]', xmlns: TagManager::XMLNS)['href'] unless author_xml.at_xpath('./xmlns:link[@rel="avatar"]', xmlns: TagManager::XMLNS).nil? || author_xml.at_xpath('./xmlns:link[@rel="avatar"]', xmlns: TagManager::XMLNS)['href'].blank?