]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Item.php
Merge remote-tracking branch 'upstream/2022.05-rc' into performance
[friendica.git] / src / Model / Item.php
index d040c876de6df1ab4a1ee614102173943bfbc66a..b63b98d77376ddd80d71617a722b9ecf732d8190 100644 (file)
@@ -87,8 +87,8 @@ class Item
                'wall', 'private', 'starred', 'origin', 'parent-origin', 'title', 'body', 'language',
                'content-warning', 'location', 'coord', 'app', 'rendered-hash', 'rendered-html', 'object',
                'allow_cid', 'allow_gid', 'deny_cid', 'deny_gid', 'mention', 'global',
-               'author-id', 'author-link', 'author-name', 'author-avatar', 'author-network',
-               'owner-id', 'owner-link', 'owner-name', 'owner-avatar', 'owner-network', 'owner-contact-type',
+               'author-id', 'author-link', 'author-name', 'author-avatar', 'author-network', 'author-updated', 'author-gsid', 'author-addr',
+               'owner-id', 'owner-link', 'owner-name', 'owner-avatar', 'owner-network', 'owner-contact-type', 'owner-updated',
                'causer-id', 'causer-link', 'causer-name', 'causer-avatar', 'causer-contact-type', 'causer-network',
                'contact-id', 'contact-uid', 'contact-link', 'contact-name', 'contact-avatar',
                'writable', 'self', 'cid', 'alias',
@@ -869,7 +869,7 @@ class Item
                $item["contact-id"] = self::contactId($item);
 
                if (!empty($item['direction']) && in_array($item['direction'], [Conversation::PUSH, Conversation::RELAY]) &&
-                       self::isTooOld($item)) {
+                       empty($item['origin']) &&self::isTooOld($item)) {
                        Logger::info('Item is too old', ['item' => $item]);
                        return 0;
                }
@@ -1751,7 +1751,7 @@ class Item
                // which point it will be automatically available through `getAvailableLanguages()` and this should be removed.
                $availableLanguages['fa'] = 'fa';
 
-               $ld = new Language($availableLanguages);
+               $ld = new Language(array_keys($availableLanguages));
                $languages = $ld->detect($naked_body)->limit(0, 3)->close();
                if (is_array($languages)) {
                        return json_encode($languages);