From a58ec29631f74259364dc71b408a8d66df657149 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 17 Jun 2018 18:57:31 +0200 Subject: Allow selecting default posting language instead of auto-detect (#7828) * Allow selecting default posting language instead of auto-detect * Enable default language setting in credentials API * Fix form saving --- app/services/post_status_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/services') diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb index a5a21c359..735985725 100644 --- a/app/services/post_status_service.rb +++ b/app/services/post_status_service.rb @@ -30,7 +30,7 @@ class PostStatusService < BaseService sensitive: (options[:sensitive].nil? ? account.user&.setting_default_sensitive : options[:sensitive]) || options[:spoiler_text].present?, spoiler_text: options[:spoiler_text] || '', visibility: options[:visibility] || account.user&.setting_default_privacy, - language: language_from_option(options[:language]) || LanguageDetector.instance.detect(text, account), + language: language_from_option(options[:language]) || account.user&.setting_default_language&.presence || LanguageDetector.instance.detect(text, account), application: options[:application]) end -- cgit