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/helpers/atom_builder_helper.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/helpers/atom_builder_helper.rb') diff --git a/app/helpers/atom_builder_helper.rb b/app/helpers/atom_builder_helper.rb index 8ca3cde26..b750eeb07 100644 --- a/app/helpers/atom_builder_helper.rb +++ b/app/helpers/atom_builder_helper.rb @@ -124,6 +124,10 @@ module AtomBuilderHelper single_link_avatar(xml, account, :original, 120) end + def link_header(xml, account) + xml.link('rel' => 'header', 'type' => account.header_content_type, 'media:width' => 700, 'media:height' => 335, 'href' => full_asset_url(account.header.url(:original))) + end + def logo(xml, url) xml.logo url end @@ -160,6 +164,7 @@ module AtomBuilderHelper summary xml, account.note link_alternate xml, TagManager.instance.url_for(account) link_avatar xml, account + link_header xml, account portable_contact xml, account privacy_scope xml, account.locked? ? :private : :public end -- cgit