Preparation for switching the connect mechanism from DFRN to AP
This commit is contained in:
parent
da545e0245
commit
581895c07d
2 changed files with 33 additions and 10 deletions
|
@ -24,6 +24,7 @@ use Friendica\Core\Logger;
|
|||
use Friendica\Core\Protocol;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Model\APContact;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Group;
|
||||
use Friendica\Model\User;
|
||||
|
@ -143,6 +144,14 @@ function dfrn_confirm_post(App $a, $handsfree = null)
|
|||
$network = $contact['network'];
|
||||
}
|
||||
|
||||
// an empty DFRN-ID tells us that it had been a request via AP from a Friendica contact
|
||||
if (($network === Protocol::DFRN) && empty($dfrn_id) && !empty($contact['hub-verify'])) {
|
||||
$apcontact = APContact::getByURL($contact['url']);
|
||||
if (!empty($apcontact)) {
|
||||
$network = Protocol::ACTIVITYPUB;
|
||||
}
|
||||
}
|
||||
|
||||
if ($network === Protocol::DFRN) {
|
||||
/*
|
||||
* Generate a key pair for all further communications with this person.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue