diff options
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/post_status_service.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb index 5b181b193..39b834604 100644 --- a/app/services/post_status_service.rb +++ b/app/services/post_status_service.rb @@ -58,6 +58,7 @@ class PostStatusService < BaseService @text = '🖼' end end + @sensitive = (@options[:sensitive].nil? ? @account.user&.setting_default_sensitive : @options[:sensitive]) || @options[:spoiler_text].present? @visibility = @options[:visibility] || @account.user&.setting_default_privacy @visibility = :unlisted if @visibility&.to_sym == :public && @account.silenced? @scheduled_at = @options[:scheduled_at]&.to_datetime @@ -166,7 +167,7 @@ class PostStatusService < BaseService media_attachments: @media || [], thread: @in_reply_to, poll_attributes: poll_attributes, - sensitive: (@options[:sensitive].nil? ? @account.user&.setting_default_sensitive : @options[:sensitive]) || @options[:spoiler_text].present?, + sensitive: @sensitive, spoiler_text: @options[:spoiler_text] || '', visibility: @visibility, language: language_from_option(@options[:language]) || @account.user&.setting_default_language&.presence || LanguageDetector.instance.detect(@text, @account), |