Merge pull request #13053 from annando/contact-update

Contacts from probeable networks are now updated correctly
This commit is contained in:
Hypolite Petovan 2023-04-28 14:40:46 -04:00 committed by GitHub
commit c63a895672
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2409,6 +2409,11 @@ class Contact
$condition = ['self' => false, 'nurl' => Strings::normaliseLink($url)];
$condition['network'] = [Protocol::DFRN, Protocol::DIASPORA, Protocol::ACTIVITYPUB];
if (!in_array($contact['network'], Protocol::NATIVE_SUPPORT) && Protocol::supportsProbe($contact['network'])) {
$condition['network'][] = $contact['network'];
}
self::update($fields, $condition);
// We mustn't set the update fields for OStatus contacts since they are updated in OnePoll