X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FWorker%2FUpdateContact.php;h=ae3b06b5067dc5ee2b0e22293ac2c5a2d8bf6387;hb=58c8959da0ece9a23966b315310a3962542bc7f4;hp=fab97a927be89e8e1831dc4c94c50a815c2ecbcf;hpb=a25fd7713b0ddf0badd76e225edd881127d42a83;p=friendica.git diff --git a/src/Worker/UpdateContact.php b/src/Worker/UpdateContact.php index fab97a927b..ae3b06b506 100644 --- a/src/Worker/UpdateContact.php +++ b/src/Worker/UpdateContact.php @@ -8,12 +8,21 @@ namespace Friendica\Worker; use Friendica\Core\Logger; use Friendica\Model\Contact; +use Friendica\Util\DateTimeFormat; +use Friendica\Database\DBA; class UpdateContact { public static function execute($contact_id) { $success = Contact::updateFromProbe($contact_id); + // Update the "updated" field if the contact could be probed. + // We don't do this in the function above, since we don't want to + // update the contact whenever that function is called from anywhere. + if ($success) { + DBA::update('contact', ['updated' => DateTimeFormat::utcNow()], ['id' => $contact_id]); + } + Logger::info('Updated from probe', ['id' => $contact_id, 'success' => $success]); } }