Fix filterable_languages method of SettingsHelper (#4966)
This commit is contained in:
parent
efec507230
commit
48d77ea1eb
7 changed files with 43 additions and 53 deletions
|
@ -28,7 +28,7 @@ class PostStatusService < BaseService
|
|||
sensitive: options[:sensitive],
|
||||
spoiler_text: options[:spoiler_text] || '',
|
||||
visibility: options[:visibility] || account.user&.setting_default_privacy,
|
||||
language: detect_language_for(text, account),
|
||||
language: LanguageDetector.instance.detect(text, account),
|
||||
application: options[:application])
|
||||
|
||||
attach_media(status, media)
|
||||
|
@ -69,10 +69,6 @@ class PostStatusService < BaseService
|
|||
media.update(status_id: status.id)
|
||||
end
|
||||
|
||||
def detect_language_for(text, account)
|
||||
LanguageDetector.new(text, account).to_iso_s
|
||||
end
|
||||
|
||||
def process_mentions_service
|
||||
@process_mentions_service ||= ProcessMentionsService.new
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue