Merge pull request #14517 from annando/dont-revive-contacts

Prevent dead contacts from being revived
This commit is contained in:
Tobias Diekershoff 2024-10-30 06:16:57 +01:00 committed by GitHub
commit a3f38d36b9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1367,7 +1367,7 @@ class Contact
$personal_contact = DBA::selectFirst('contact', $fields, ["`nurl` = ? AND `uid` != 0", Strings::normaliseLink($url)]); $personal_contact = DBA::selectFirst('contact', $fields, ["`nurl` = ? AND `uid` != 0", Strings::normaliseLink($url)]);
} }
if (DBA::isResult($personal_contact)) { if (DBA::isResult($personal_contact) && !Probe::isProbable($personal_contact['network'])) {
Logger::info('Take contact data from personal contact', ['url' => $url, 'update' => $update, 'contact' => $personal_contact]); Logger::info('Take contact data from personal contact', ['url' => $url, 'update' => $update, 'contact' => $personal_contact]);
$data = $personal_contact; $data = $personal_contact;
$data['photo'] = $personal_contact['avatar']; $data['photo'] = $personal_contact['avatar'];