sforkowany z mirror/friendica
Issue 9705: Perform an age check when the post isn't fetched
rodzic
56fbd0026a
commit
b160aa07b6
|
@ -1698,6 +1698,12 @@ class Item
|
||||||
// The contact-id should be set before "self::insert" was called - but there seems to be issues sometimes
|
// The contact-id should be set before "self::insert" was called - but there seems to be issues sometimes
|
||||||
$item["contact-id"] = self::contactId($item);
|
$item["contact-id"] = self::contactId($item);
|
||||||
|
|
||||||
|
if (!empty($item['direction']) && in_array($item['direction'], [Conversation::PUSH, Conversation::RELAY]) &&
|
||||||
|
self::isTooOld($item)) {
|
||||||
|
Logger::info('Item is too old', ['item' => $item]);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (!self::isValid($item)) {
|
if (!self::isValid($item)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue