]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/APContact.php
some more renamings & doku
[friendica.git] / src / Model / APContact.php
index 22f168d8f601baecf6bf524e5e2fe973861a2bd5..ce66ec4c6e651e531b452f88df51923307ebf6fc 100644 (file)
@@ -12,6 +12,7 @@ use Friendica\Protocol\ActivityPub;
 use Friendica\Util\Network;
 use Friendica\Util\JsonLD;
 use Friendica\Util\DateTimeFormat;
+use Friendica\Content\Text\HTML;
 
 require_once 'boot.php';
 
@@ -63,7 +64,7 @@ class APContact extends BaseObject
         * @param boolean $update true = always update, false = never update, null = update when not found
         * @return array profile array
         */
-       public static function getProfileByURL($url, $update = null)
+       public static function getByURL($url, $update = null)
        {
                if (empty($url)) {
                        return false;
@@ -105,7 +106,7 @@ class APContact extends BaseObject
 
                $apcontact = [];
                $apcontact['url'] = $data['id'];
-               $apcontact['uuid'] = defaults($data, 'uuid', null);
+               $apcontact['uuid'] = defaults($data, 'diaspora:guid', null);
                $apcontact['type'] = defaults($data, 'type', null);
                $apcontact['following'] = defaults($data, 'following', null);
                $apcontact['followers'] = defaults($data, 'followers', null);
@@ -114,7 +115,7 @@ class APContact extends BaseObject
                $apcontact['sharedinbox'] = JsonLD::fetchElement($data, 'endpoints', 'sharedInbox');
                $apcontact['nick'] = defaults($data, 'preferredUsername', null);
                $apcontact['name'] = defaults($data, 'name', $apcontact['nick']);
-               $apcontact['about'] = defaults($data, 'summary', '');
+               $apcontact['about'] = HTML::toBBCode(defaults($data, 'summary', ''));
                $apcontact['photo'] = JsonLD::fetchElement($data, 'icon', 'url');
                $apcontact['alias'] = JsonLD::fetchElement($data, 'url', 'href');