Skip to content
Snippets Groups Projects
Commit 0c52654b authored by Renato "Lond" Cerqueira's avatar Renato "Lond" Cerqueira Committed by Eugen Rochko
Browse files

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.
parent 904a2479
No related branches found
No related tags found
No related merge requests found
......@@ -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),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment