about summary refs log tree commit diff
path: root/app/lib
diff options
context:
space:
mode:
authorFire Demon <firedemon@creature.cafe>2020-08-20 20:21:06 -0500
committerFire Demon <firedemon@creature.cafe>2020-08-30 05:45:19 -0500
commitb3190a5d3a82f3575ad6ed9cf85bc8f1362498f4 (patch)
treec23fab45bd056e199058a14f1e1ee54201eb7427 /app/lib
parent4f3e491ad07a6468243c92aca520309b53ac8e70 (diff)
[RSS] Add support for article
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/rss/serializer.rb1
-rw-r--r--app/lib/rss_builder.rb6
2 files changed, 7 insertions, 0 deletions
diff --git a/app/lib/rss/serializer.rb b/app/lib/rss/serializer.rb
index fd56c568c..334726885 100644
--- a/app/lib/rss/serializer.rb
+++ b/app/lib/rss/serializer.rb
@@ -10,6 +10,7 @@ class RSS::Serializer
             .link(ActivityPub::TagManager.instance.url_for(status))
             .pub_date(status.created_at)
             .description(status.spoiler_text.presence || Formatter.instance.format(status, inline_poll_options: true).to_str)
+            .content(Formatter.instance.format(status, inline_poll_options: true, article_content: true).to_str)
 
         status.media_attachments.each do |media|
           item.enclosure(full_asset_url(media.file.url(:original, false)), media.file.content_type, media.file.size)
diff --git a/app/lib/rss_builder.rb b/app/lib/rss_builder.rb
index 63ddba2e8..a74b4e035 100644
--- a/app/lib/rss_builder.rb
+++ b/app/lib/rss_builder.rb
@@ -35,6 +35,12 @@ class RSSBuilder
       self
     end
 
+    def content(str)
+      @item << (Ox::Element.new('content:encoded') << str)
+
+      self
+    end
+
     def enclosure(url, type, size)
       @item << Ox::Element.new('enclosure').tap do |enclosure|
         enclosure['url']    = url