Remove dependency to App in Contact::createFromProbe

- Address https://github.com/friendica/friendica/issues/8473#issuecomment-641259906
This commit is contained in:
Hypolite Petovan 2020-06-10 10:36:42 -04:00
parent 5f18d27b0b
commit a5a7855d39
7 changed files with 32 additions and 33 deletions

View file

@ -167,10 +167,9 @@ class Contact extends BaseModule
return;
}
$uid = $contact['uid'];
if ($contact['network'] == Protocol::OSTATUS) {
$result = Model\Contact::createFromProbe($uid, $contact['url'], false, $contact['network']);
$user = Model\User::getById($contact['uid']);
$result = Model\Contact::createFromProbe($user, $contact['url'], false, $contact['network']);
if ($result['success']) {
DBA::update('contact', ['subhub' => 1], ['id' => $contact_id]);