You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
738 B

  1. # frozen_string_literal: true
  2. Nokogiri::XML::Builder.new do |xml|
  3. feed(xml) do
  4. simple_id xml, account_url(@account, format: 'atom')
  5. title xml, @account.display_name
  6. subtitle xml, @account.note
  7. updated_at xml, stream_updated_at
  8. logo xml, full_asset_url(@account.avatar.url( :original))
  9. author(xml) do
  10. include_author xml, @account
  11. end
  12. link_alternate xml, TagManager.instance.url_for(@account)
  13. link_self xml, account_url(@account, format: 'atom')
  14. link_hub xml, api_push_url
  15. link_salmon xml, api_salmon_url(@account.id)
  16. @entries.each do |stream_entry|
  17. entry(xml, false) do
  18. include_entry xml, stream_entry
  19. end
  20. end
  21. end
  22. end.to_xml