Fix filterable_languages method of SettingsHelper (#4966)
This commit is contained in:
committed by
Eugen Rochko
parent
efec507230
commit
48d77ea1eb
@ -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
|
||||
|
Reference in New Issue
Block a user