mirror of
https://github.com/friendica/friendica
synced 2025-04-25 08:30:11 +00:00
Ensure that local contacts always are DFRN contacts
This commit is contained in:
parent
7db4c7ea02
commit
ccc7a71e54
5 changed files with 52 additions and 9 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue