From: Claire Date: Tue, 8 Feb 2022 17:23:53 +0000 (+0100) Subject: Merge branch 'main' into glitch-soc/merge-upstream X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=692963d43beb5e66a86e15d63b5aa3eeca82f0a1;p=mastodon.git Merge branch 'main' into glitch-soc/merge-upstream --- 692963d43beb5e66a86e15d63b5aa3eeca82f0a1 diff --cc app/services/post_status_service.rb index 9d26e0f5b,b3bc4a0a2..c5061dd63 --- a/app/services/post_status_service.rb +++ b/app/services/post_status_service.rb @@@ -174,9 -162,8 +171,9 @@@ class PostStatusService < BaseServic 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), + language: valid_locale_or_nil(@options[:language].presence || @account.user&.preferred_posting_language || I18n.default_locale), application: @options[:application], + content_type: @options[:content_type] || @account.user&.setting_default_content_type, rate_limit: @options[:with_rate_limit], }.compact end