about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/helpers/atom_builder_helper.rb5
-rw-r--r--app/services/post_status_service.rb2
-rw-r--r--app/services/process_feed_service.rb2
3 files changed, 4 insertions, 5 deletions
diff --git a/app/helpers/atom_builder_helper.rb b/app/helpers/atom_builder_helper.rb
index f17b4cc72..c08d80ea0 100644
--- a/app/helpers/atom_builder_helper.rb
+++ b/app/helpers/atom_builder_helper.rb
@@ -42,9 +42,8 @@ module AtomBuilderHelper
   end
 
   def content(xml, content, warning = nil)
-    extra = { type: 'html' }
-    extra[:warning] = warning unless warning.blank?
-    xml.content(extra, content) unless content.blank?
+    xml.summary(warning) unless warning.blank?
+    xml.content({ type: 'html' }, content) unless content.blank?
   end
 
   def title(xml, title)
diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb
index 91b654603..979941c84 100644
--- a/app/services/post_status_service.rb
+++ b/app/services/post_status_service.rb
@@ -16,7 +16,7 @@ class PostStatusService < BaseService
     status = account.statuses.create!(text: text,
                                       thread: in_reply_to,
                                       sensitive: options[:sensitive],
-                                      spoiler_text: options[:spoiler_text],
+                                      spoiler_text: options[:spoiler_text] || '',
                                       visibility: options[:visibility],
                                       application: options[:application])
 
diff --git a/app/services/process_feed_service.rb b/app/services/process_feed_service.rb
index 4576b4321..626534176 100644
--- a/app/services/process_feed_service.rb
+++ b/app/services/process_feed_service.rb
@@ -225,7 +225,7 @@ class ProcessFeedService < BaseService
     end
 
     def content_warning(xml = @xml)
-      xml.at_xpath('./xmlns:content', xmlns: TagManager::XMLNS)['warning']
+      xml.at_xpath('./xmlns:summary', xmlns: TagManager::XMLNS)&.content || ''
     end
 
     def published(xml = @xml)