diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-02-08 18:23:53 +0100 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2022-02-08 18:23:53 +0100 |
commit | 692963d43beb5e66a86e15d63b5aa3eeca82f0a1 (patch) | |
tree | bc7319ae242a889bb1d05b7afdd365d78a43ac1d /app/lib/activitypub/activity/create.rb | |
parent | b1983623aec8e0b066d115736d2151e0c74407fa (diff) | |
parent | b6d7726ecbc833abd00f6a9d36b24d9776cfe623 (diff) |
Merge branch 'main' into glitch-soc/merge-upstream
Diffstat (limited to 'app/lib/activitypub/activity/create.rb')
-rw-r--r-- | app/lib/activitypub/activity/create.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/app/lib/activitypub/activity/create.rb b/app/lib/activitypub/activity/create.rb index ad273c20b..cf31b6ff6 100644 --- a/app/lib/activitypub/activity/create.rb +++ b/app/lib/activitypub/activity/create.rb @@ -112,7 +112,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity url: @status_parser.url || @status_parser.uri, account: @account, text: converted_object_type? ? converted_text : (@status_parser.text || ''), - language: @status_parser.language || detected_language, + language: @status_parser.language, spoiler_text: converted_object_type? ? '' : (@status_parser.spoiler_text || ''), created_at: @status_parser.created_at, edited_at: @status_parser.edited_at, @@ -370,10 +370,6 @@ class ActivityPub::Activity::Create < ActivityPub::Activity Formatter.instance.linkify([@status_parser.title.presence, @status_parser.spoiler_text.presence, @status_parser.url || @status_parser.uri].compact.join("\n\n")) end - def detected_language - LanguageDetector.instance.detect(@status_parser.text, @account) if supported_object_type? - end - def unsupported_media_type?(mime_type) mime_type.present? && !MediaAttachment.supported_mime_types.include?(mime_type) end |