[Database version 1499] Create new paradigm classes for Diaspora Contact
- Switch table fcontact for dcontact in views
This commit is contained in:
@@ -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 = '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user