about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-01-25 16:53:30 +0100
committerEugen Rochko <eugen@zeonfederated.com>2017-01-25 16:53:30 +0100
commit3beb24ad5544723348d1e23a99c2b5ab1e26ae1f (patch)
treeda6109c6c30a8ed0349284eef93659a7b6c12e6c /app/services
parent0430f7c0fa73e03fad83af123b22f56cfe60c7fb (diff)
Use <summary> to encode content warnings instead
Diffstat (limited to 'app/services')
-rw-r--r--app/services/post_status_service.rb2
-rw-r--r--app/services/process_feed_service.rb2
2 files changed, 2 insertions, 2 deletions
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)