diff --git a/src/Factory/Api/Mastodon/Status.php b/src/Factory/Api/Mastodon/Status.php index a1f7060ac..190f1e0e2 100644 --- a/src/Factory/Api/Mastodon/Status.php +++ b/src/Factory/Api/Mastodon/Status.php @@ -259,12 +259,12 @@ class Status extends BaseFactory } } - $item['body'] = $this->contentItem->addSharedPost($item); - $item['body'] = Post\Media::addHTMLAttachmentToBody($uriId, $item['body']); - if (!is_null($item['raw-body'])) { $item['raw-body'] = $this->contentItem->addSharedPost($item, $item['raw-body']); $item['raw-body'] = Post\Media::addHTMLLinkToBody($uriId, $item['raw-body']); + } else { + $item['body'] = $this->contentItem->addSharedPost($item); + $item['body'] = Post\Media::addHTMLLinkToBody($uriId, $item['body']); } } diff --git a/src/Protocol/Feed.php b/src/Protocol/Feed.php index cbffd810c..625305161 100644 --- a/src/Protocol/Feed.php +++ b/src/Protocol/Feed.php @@ -1124,7 +1124,7 @@ class Feed XML::addElement($doc, $entry, 'title', html_entity_decode($title, ENT_QUOTES, 'UTF-8')); $body = Post\Media::addAttachmentsToBody($item['uri-id'], DI::contentItem()->addSharedPost($item)); - $body = Post\Media::addHTMLAttachmentToBody($item['uri-id'], $body); + $body = Post\Media::addHTMLLinkToBody($item['uri-id'], $body); $body = BBCode::convertForUriId($item['uri-id'], $body, BBCode::ACTIVITYPUB); diff --git a/src/Protocol/OStatus.php b/src/Protocol/OStatus.php index 220424a31..abaa298eb 100644 --- a/src/Protocol/OStatus.php +++ b/src/Protocol/OStatus.php @@ -1515,7 +1515,7 @@ class OStatus XML::addElement($doc, $entry, 'title', html_entity_decode($title, ENT_QUOTES, 'UTF-8')); $body = Post\Media::addAttachmentsToBody($item['uri-id'], DI::contentItem()->addSharedPost($item)); - $body = Post\Media::addHTMLAttachmentToBody($item['uri-id'], $body); + $body = Post\Media::addHTMLLinkToBody($item['uri-id'], $body); if (!empty($item['title'])) { $body = '[b]' . $item['title'] . "[/b]\n\n" . $body;