When creating status, if no sensitive status is given, use default (#7057)
Clients using the API that do not provide the sensitive flag are always posting with false sensitive option.
This commit is contained in:
parent
7a06bd7085
commit
ddbc1572f2
1 changed files with 1 additions and 1 deletions
|
@ -28,7 +28,7 @@ class PostStatusService < BaseService
|
|||
status = account.statuses.create!(text: text,
|
||||
media_attachments: media || [],
|
||||
thread: in_reply_to,
|
||||
sensitive: options[:sensitive],
|
||||
sensitive: (options[:sensitive].nil? ? account.user&.setting_default_sensitive : options[:sensitive]),
|
||||
spoiler_text: options[:spoiler_text] || '',
|
||||
visibility: options[:visibility] || account.user&.setting_default_privacy,
|
||||
language: LanguageDetector.instance.detect(text, account),
|
||||
|
|
Loading…
Reference in a new issue