1
0
Fork 0

Merge pull request #8044 from annando/contact-adding

Don't add contacts when not needed
This commit is contained in:
Philipp 2020-01-01 20:38:34 +01:00 committed by GitHub
commit 75c74e8562
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 52 additions and 19 deletions

View file

@ -10,7 +10,6 @@ use Friendica\Core\Logger;
use Friendica\Core\Protocol;
use Friendica\Database\DBA;
use Friendica\Model\GContact;
use Friendica\Model\Contact;
use Friendica\Model\GServer;
use Friendica\Network\Probe;
use Friendica\Util\Network;
@ -55,7 +54,7 @@ class SearchDirectory
continue;
}
$server_url = Contact::getBasepath($jj->url);
$server_url = GContact::getBasepath($jj->url, true);
if ($server_url != '') {
if (!GServer::check($server_url)) {
Logger::info("Friendica server doesn't answer.", ['server' => $server_url]);

View file

@ -9,7 +9,7 @@ use Friendica\Core\Logger;
use Friendica\Core\Protocol;
use Friendica\Core\Worker;
use Friendica\Database\DBA;
use Friendica\Model\Contact;
use Friendica\Model\GContact;
use Friendica\Model\GServer;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Strings;
@ -53,7 +53,7 @@ class UpdateGContacts
continue;
}
$server_url = Contact::getBasepath($contact['url']);
$server_url = GContact::getBasepath($contact['url'], true);
$force_update = false;
if (!empty($contact['server_url'])) {