Take language from quoted post

This commit is contained in:
Michael 2024-01-08 06:48:49 +00:00
parent 5dedf5e500
commit 7a680dd9b7
1 changed files with 7 additions and 0 deletions

View File

@ -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)) {