about summary refs log tree commit diff
path: root/app/helpers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-03-18 22:51:20 +0100
committerEugen Rochko <eugen@zeonfederated.com>2017-03-18 22:51:20 +0100
commit2816b1bf8efa61af5abc045a2567220e71f6dad1 (patch)
treecd75548d1f4da9debf5642b73a8a45034f6e0559 /app/helpers
parent5cfc9c74872fff63f3ddf81de0baebfd50e2fc72 (diff)
Federate header images, fix open-uri http->https redirection error
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/atom_builder_helper.rb5
1 files changed, 5 insertions, 0 deletions
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