From 2816b1bf8efa61af5abc045a2567220e71f6dad1 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 18 Mar 2017 22:51:20 +0100 Subject: Federate header images, fix open-uri http->https redirection error --- app/services/update_remote_profile_service.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'app/services') diff --git a/app/services/update_remote_profile_service.rb b/app/services/update_remote_profile_service.rb index dc315db19..74baa1cc5 100644 --- a/app/services/update_remote_profile_service.rb +++ b/app/services/update_remote_profile_service.rb @@ -14,6 +14,7 @@ class UpdateRemoteProfileService < BaseService 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? + account.header_remote_url = author_xml.at_xpath('./xmlns:link[@rel="header"]', xmlns: TagManager::XMLNS)['href'] unless author_xml.at_xpath('./xmlns:link[@rel="header"]', xmlns: TagManager::XMLNS).nil? || author_xml.at_xpath('./xmlns:link[@rel="header"]', xmlns: TagManager::XMLNS)['href'].blank? end end -- cgit