Use <summary> to encode content warnings instead
This commit is contained in:
parent
0430f7c0fa
commit
3beb24ad55
4 changed files with 5 additions and 8 deletions
|
@ -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])
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue