Add a feed for statuses

This commit is contained in:
2023-04-14 20:19:49 +10:00
parent d3c4723f17
commit c4a1a39740
6 changed files with 68 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
require "builder"
module Adamantium
module Views
module Feeds
class StatusesRss < Adamantium::View
include Deps["repos.post_repo"]
expose :posts do
post_repo.statuses_for_rss.map do |post|
Decorators::Posts::Decorator.new post
end
end
expose :xml, decorate: false, layout: true
def xml
Builder::XmlMarkup.new(indent: 2)
end
end
end
end
end