0
0
Fork 0

Instead of using spoiler boolean and spoiler_text, simply check for non-blank spoiler_text

Federate spoiler_text using warning attribute on <content /> instead of a <category term="spoiler" />
Clean up schema file from accidental development migrations
This commit is contained in:
Eugen Rochko 2017-01-25 00:49:08 +01:00
parent f8da0dd490
commit 999cde94a6
23 changed files with 159 additions and 173 deletions

View file

@ -103,6 +103,7 @@ class ProcessFeedService < BaseService
url: url(entry),
account: account,
text: content(entry),
spoiler_text: content_warning(entry),
created_at: published(entry)
)
@ -223,6 +224,10 @@ class ProcessFeedService < BaseService
xml.at_xpath('./xmlns:content', xmlns: TagManager::XMLNS).content
end
def content_warning(xml = @xml)
xml.at_xpath('./xmlns:content', xmlns: TagManager::XMLNS)['warning']
end
def published(xml = @xml)
xml.at_xpath('./xmlns:published', xmlns: TagManager::XMLNS).content
end