Only offer translation for supported languages (#23879)
This commit is contained in:
parent
0872f3e3d7
commit
5a8c651e8f
13 changed files with 336 additions and 31 deletions
|
@ -6,7 +6,7 @@ class TranslateStatusService < BaseService
|
|||
include FormattingHelper
|
||||
|
||||
def call(status, target_language)
|
||||
raise Mastodon::NotPermittedError unless status.public_visibility? || status.unlisted_visibility?
|
||||
raise Mastodon::NotPermittedError unless status.translatable?
|
||||
|
||||
@status = status
|
||||
@content = status_content_format(@status)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue