]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/APContact.php
Replace profile tab GET parameter by route
[friendica.git] / src / Model / APContact.php
index e3c3a0a12b2f09fc51c7ca403e6f2c4ac91a0c65..dd27daf10d36374d803730264db0638b8b4d684c 100644 (file)
@@ -6,18 +6,17 @@
 
 namespace Friendica\Model;
 
-use Friendica\BaseObject;
 use Friendica\Content\Text\HTML;
 use Friendica\Core\Logger;
-use Friendica\Core\Config;
 use Friendica\Database\DBA;
+use Friendica\DI;
 use Friendica\Protocol\ActivityPub;
 use Friendica\Util\Network;
 use Friendica\Util\JsonLD;
 use Friendica\Util\DateTimeFormat;
 use Friendica\Util\Strings;
 
-class APContact extends BaseObject
+class APContact
 {
        /**
         * Resolves the profile url from the address by using webfinger
@@ -34,7 +33,7 @@ class APContact extends BaseObject
                        return false;
                }
 
-               $xrd_timeout = Config::get('system', 'xrd_timeout');
+               $xrd_timeout = DI::config()->get('system', 'xrd_timeout');
 
                $webfinger = 'https://' . $addr_parts[1] . '/.well-known/webfinger?resource=acct:' . urlencode($addr);
 
@@ -192,6 +191,7 @@ class APContact extends BaseObject
                        $apcontact['addr'] = '';
                }
 
+               $apcontact['pubkey'] = null;
                if (!empty($compacted['w3id:publicKey'])) {
                        $apcontact['pubkey'] = trim(JsonLD::fetchElement($compacted['w3id:publicKey'], 'w3id:publicKeyPem', '@value'));
                }