[Database version 1499] Create new paradigm classes for Diaspora Contact

- Switch table fcontact for dcontact in views
This commit is contained in:
Hypolite Petovan 2021-09-15 00:36:01 -04:00
parent ace80ca1b4
commit ce69026964
14 changed files with 734 additions and 170 deletions

View file

@ -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 = '';
}