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:
parent
f8da0dd490
commit
999cde94a6
23 changed files with 159 additions and 173 deletions
|
@ -8,18 +8,16 @@ class PostStatusService < BaseService
|
|||
# @param [Hash] options
|
||||
# @option [Boolean] :sensitive
|
||||
# @option [String] :visibility
|
||||
# @option [Boolean] :spoiler
|
||||
# @option [String] :spoiler_text
|
||||
# @option [Enumerable] :media_ids Optional array of media IDs to attach
|
||||
# @option [Doorkeeper::Application] :application
|
||||
# @return [Status]
|
||||
def call(account, text, in_reply_to = nil, options = {})
|
||||
status = account.statuses.create!(text: text,
|
||||
thread: in_reply_to,
|
||||
sensitive: options[:sensitive],
|
||||
spoiler: options[:spoiler],
|
||||
spoiler_text: options[:spoiler_text],
|
||||
visibility: options[:visibility],
|
||||
status = account.statuses.create!(text: text,
|
||||
thread: in_reply_to,
|
||||
sensitive: options[:sensitive],
|
||||
spoiler_text: options[:spoiler_text],
|
||||
visibility: options[:visibility],
|
||||
application: options[:application])
|
||||
|
||||
attach_media(status, options[:media_ids])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue