From cbfc3d0c28e0b55c3ccf1ddfd321798a8c2532e8 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 3 Oct 2018 19:00:32 +0000 Subject: [PATCH] Fix error / "about" is now converted to BBCode --- src/Model/APContact.php | 3 ++- src/Protocol/ActivityPub/Transmitter.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Model/APContact.php b/src/Model/APContact.php index efd6ed0e9d..ce66ec4c6e 100644 --- a/src/Model/APContact.php +++ b/src/Model/APContact.php @@ -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'; @@ -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'); diff --git a/src/Protocol/ActivityPub/Transmitter.php b/src/Protocol/ActivityPub/Transmitter.php index 76c233fd5e..b92148e1ff 100644 --- a/src/Protocol/ActivityPub/Transmitter.php +++ b/src/Protocol/ActivityPub/Transmitter.php @@ -700,7 +700,7 @@ class Transmitter * * @return object array */ - private static function createNote($item) + public static function createNote($item) { if (!empty($item['title'])) { $type = 'Article'; -- 2.39.5