about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
authorChristian Schmidt <github@chsc.dk>2023-03-03 21:06:31 +0100
committerGitHub <noreply@github.com>2023-03-03 21:06:31 +0100
commit5a8c651e8f0252c7135042e79396f782361302d9 (patch)
treee3e0a8c7f1410507a5ce311625e185ac5bdddae8 /app/services
parent0872f3e3d743a16533ac4fad4cd83b103047808c (diff)
Only offer translation for supported languages (#23879)
Diffstat (limited to 'app/services')
-rw-r--r--app/services/translate_status_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/translate_status_service.rb b/app/services/translate_status_service.rb
index 539a0d9db..92d8b62a0 100644
--- a/app/services/translate_status_service.rb
+++ b/app/services/translate_status_service.rb
@@ -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)