Avoid locally probing last item via network

This commit is contained in:
Michael 2020-08-19 04:45:31 +00:00
parent 29494ea721
commit eb95314aaa
2 changed files with 13 additions and 0 deletions

View file

@ -2012,6 +2012,14 @@ class Probe
*/
public static function getLastUpdate(array $data)
{
$uid = User::getIdForURL($data['url']);
if (!empty($uid)) {
$contact = Contact::selectFirst(['url', 'last-item'], ['self' => true, 'uid' => $uid]);
if (!empty($contact['last-item'])) {
return $contact['last-item'];
}
}
if ($lastUpdate = self::updateFromNoScrape($data)) {
return $lastUpdate;
}