mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-10 15:34:27 +02:00
[Database version 1499] Create new paradigm classes for Diaspora Contact
- Switch table fcontact for dcontact in views
This commit is contained in:
parent
ace80ca1b4
commit
ce69026964
14 changed files with 734 additions and 170 deletions
|
@ -45,6 +45,7 @@ use Friendica\Model\Post;
|
|||
use Friendica\Model\Profile;
|
||||
use Friendica\Model\Tag;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Network\HTTPException;
|
||||
use Friendica\Network\Probe;
|
||||
use Friendica\Util\Crypto;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
|
@ -981,12 +982,12 @@ class DFRN
|
|||
}
|
||||
}
|
||||
|
||||
$fcontact = FContact::getByURL($contact['addr']);
|
||||
if (empty($fcontact)) {
|
||||
try {
|
||||
$pubkey = DI::dsprContact()->getByAddr(WebFingerUri::fromString($contact['addr']))->pubKey;
|
||||
} catch (HTTPException\NotFoundException|\InvalidArgumentException $e) {
|
||||
Logger::notice('Unable to find contact details for ' . $contact['id'] . ' - ' . $contact['addr']);
|
||||
return -22;
|
||||
}
|
||||
$pubkey = $fcontact['pubkey'] ?? '';
|
||||
} else {
|
||||
$pubkey = '';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue