Apply suggestions from code review

Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
This commit is contained in:
Michael Vogel 2024-03-16 09:19:57 +01:00 committed by GitHub
parent b75fdbbd32
commit e6c23e69cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2826,10 +2826,10 @@ class Contact
) { ) {
if (GServer::reachable($contact)) { if (GServer::reachable($contact)) {
self::updateContact($id, $uid, $uriid, $contact['url'], ['failed' => false, 'local-data' => $has_local_data, 'last-update' => $updated, 'next-update' => $success_next_update, 'success_update' => $updated, 'unsearchable' => true]); self::updateContact($id, $uid, $uriid, $contact['url'], ['failed' => false, 'local-data' => $has_local_data, 'last-update' => $updated, 'next-update' => $success_next_update, 'success_update' => $updated, 'unsearchable' => true]);
Logger::info('Not updating relais', ['id' => $id, 'url' => $contact['url']]); Logger::info('Not updating relay', ['id' => $id, 'url' => $contact['url']]);
return true; return true;
} }
Logger::info('Relais server is not reachable', ['id' => $id, 'url' => $contact['url']]); Logger::info('Relay server is not reachable', ['id' => $id, 'url' => $contact['url']]);
self::updateContact($id, $uid, $uriid, $contact['url'], ['failed' => true, 'local-data' => $has_local_data, 'last-update' => $updated, 'next-update' => $failed_next_update, 'failure_update' => $updated, 'unsearchable' => true]); self::updateContact($id, $uid, $uriid, $contact['url'], ['failed' => true, 'local-data' => $has_local_data, 'last-update' => $updated, 'next-update' => $failed_next_update, 'failure_update' => $updated, 'unsearchable' => true]);
return false; return false;
} }