From 305fe62659f892e5e3a122c5c797ac6592171042 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 3 Sep 2020 19:13:03 +0000 Subject: [PATCH] Content is now filled --- src/Module/Api/Mastodon/Timelines/PublicTimeline.php | 1 - src/Object/Api/Mastodon/Status.php | 11 ++++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Module/Api/Mastodon/Timelines/PublicTimeline.php b/src/Module/Api/Mastodon/Timelines/PublicTimeline.php index 989172af1..d97d8e4f5 100644 --- a/src/Module/Api/Mastodon/Timelines/PublicTimeline.php +++ b/src/Module/Api/Mastodon/Timelines/PublicTimeline.php @@ -56,7 +56,6 @@ class PublicTimeline extends BaseApi $condition = ['gravity' => [GRAVITY_PARENT, GRAVITY_COMMENT], 'private' => Item::PUBLIC]; if ($local) { - $condition['wall'] = true; $condition['origin'] = true; } else { $condition['uid'] = 0; diff --git a/src/Object/Api/Mastodon/Status.php b/src/Object/Api/Mastodon/Status.php index 0a477e92f..c37310814 100644 --- a/src/Object/Api/Mastodon/Status.php +++ b/src/Object/Api/Mastodon/Status.php @@ -22,6 +22,7 @@ namespace Friendica\Object\Api\Mastodon; use Friendica\BaseEntity; +use Friendica\Content\Text\BBCode; use Friendica\Util\DateTimeFormat; /** @@ -96,8 +97,8 @@ class Status extends BaseEntity */ public function __construct(array $item, Account $account) { - $this->id = (string)$item['uri-id']; - $this->created_at = DateTimeFormat::utc($item['created'], DateTimeFormat::ATOM); + $this->id = (string)$item['uri-id']; + $this->created_at = DateTimeFormat::utc($item['created'], DateTimeFormat::ATOM); if ($item['gravity'] == GRAVITY_COMMENT) { $this->in_reply_to_id = (string)$item['thr-parent-id']; @@ -105,7 +106,7 @@ class Status extends BaseEntity } $this->sensitive = false; - $this->spoiler_text = ""; + $this->spoiler_text = $item['title']; $visibility = ['public', 'private', 'unlisted']; $this->visibility = $visibility[$item['private']]; @@ -121,10 +122,10 @@ class Status extends BaseEntity $this->muted = false; $this->bookmarked = false; $this->pinned = false; - $this->content; + $this->content = BBCode::convert($item['body'], false); $this->reblog = null; $this->application = null; - $this->account = $account->toArray(); + $this->account = $account->toArray(); $this->media_attachments = []; $this->mentions = []; $this->tags = [];