Ensure that local contacts always are DFRN contacts

This commit is contained in:
Michael 2020-01-16 06:43:21 +00:00
parent 7db4c7ea02
commit ccc7a71e54
5 changed files with 52 additions and 9 deletions

View file

@ -38,9 +38,7 @@ class OnePoll
return;
}
if ($force) {
Contact::updateFromProbe($contact_id, '', true);
}
Contact::updateFromProbe($contact_id, '', $force);
$contact = DBA::selectFirst('contact', [], ['id' => $contact_id]);
if (!DBA::isResult($contact)) {
@ -48,6 +46,12 @@ class OnePoll
return;
}
// Special treatment for wrongly detected local contacts
if (!$force && ($contact['network'] != Protocol::DFRN) && Contact::isLocalById($contact_id)) {
Contact::updateFromProbe($contact_id, Protocol::DFRN, true);
$contact = DBA::selectFirst('contact', [], ['id' => $contact_id]);
}
if (($contact['network'] == Protocol::DFRN) && !Contact::isLegacyDFRNContact($contact)) {
$protocol = Protocol::ACTIVITYPUB;
} else {