mirror of
https://github.com/friendica/friendica
synced 2025-04-29 11:44:24 +02:00
OStatus contacts are now automatically converted to AP
This commit is contained in:
parent
514ec1be6d
commit
efad4936b0
7 changed files with 27 additions and 10 deletions
|
@ -13,6 +13,7 @@ use Friendica\Database\DBA;
|
|||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Protocol\Email;
|
||||
use Friendica\Protocol\ActivityPub;
|
||||
use Friendica\Protocol\PortableContact;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\Network;
|
||||
|
@ -55,6 +56,17 @@ class OnePoll
|
|||
|
||||
$importer_uid = $contact['uid'];
|
||||
|
||||
// Possibly switch the remote contact to AP
|
||||
if ($contact['network'] === Protocol::OSTATUS) {
|
||||
ActivityPub\Receiver::switchContact($contact['id'], $importer_uid, $contact['url']);
|
||||
$contact = DBA::selectFirst('contact', [], ['id' => $contact_id]);
|
||||
}
|
||||
|
||||
// We currently don't do anything with AP here
|
||||
if ($contact['network'] === Protocol::ACTIVITYPUB) {
|
||||
return;
|
||||
}
|
||||
|
||||
// load current friends if possible.
|
||||
if (($contact['poco'] != "") && ($contact['success_update'] > $contact['failure_update'])) {
|
||||
$r = q("SELECT count(*) AS total FROM glink
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue