Adding sensitive marker to statuses in API
This commit is contained in:
parent
4bdb6a0eaf
commit
0603971894
5 changed files with 19 additions and 11 deletions
|
@ -5,11 +5,13 @@ class PostStatusService < BaseService
|
|||
# @param [Account] account Account from which to post
|
||||
# @param [String] text Message
|
||||
# @param [Status] in_reply_to Optional status to reply to
|
||||
# @param [Enumerable] media_ids Optional array of media IDs to attach
|
||||
# @param [Hash] options
|
||||
# @option [Boolean] :sensitive
|
||||
# @option [Enumerable] :media_ids Optional array of media IDs to attach
|
||||
# @return [Status]
|
||||
def call(account, text, in_reply_to = nil, media_ids = nil)
|
||||
status = account.statuses.create!(text: text, thread: in_reply_to)
|
||||
attach_media(status, media_ids)
|
||||
def call(account, text, in_reply_to = nil, options = {})
|
||||
status = account.statuses.create!(text: text, thread: in_reply_to, sensitive: options[:sensitive])
|
||||
attach_media(status, options[:media_ids])
|
||||
process_mentions_service.call(status)
|
||||
process_hashtags_service.call(status)
|
||||
DistributionWorker.perform_async(status.id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue