From: Michael Date: Mon, 8 Jan 2024 06:48:49 +0000 (+0000) Subject: Take language from quoted post X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=602c253fa8fd7aa0d5448d87662f5cbdca0ff806;p=friendica.git Take language from quoted post --- diff --git a/src/Model/Item.php b/src/Model/Item.php index f9ccc473fe..d49d6e2390 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -2075,6 +2075,13 @@ class Item $content = trim(($item['title'] ?? '') . ' ' . ($item['content-warning'] ?? '') . ' ' . ($item['body'] ?? '')); + if (empty($content) && !empty($item['quote-uri-id'])) { + $quoted = Post::selectFirstPost(['language'], ['uri-id' => $item['quote-uri-id']]); + if (!empty($quoted['language'])) { + return $quoted['language']; + } + } + $languages = self::getLanguageArray($content, 3, $item['uri-id'], $item['author-id'], $transmitted); if (!empty($transmitted)) {