From d41ec728e4fb0b92c84200ae020295c8d0c504f4 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 4 Mar 2023 21:36:19 +0000 Subject: [PATCH] We only need a link here --- src/Factory/Api/Mastodon/Status.php | 6 +++--- src/Protocol/Feed.php | 2 +- src/Protocol/OStatus.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Factory/Api/Mastodon/Status.php b/src/Factory/Api/Mastodon/Status.php index a1f7060ac0..190f1e0e21 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 cbffd810c1..625305161f 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 220424a31c..abaa298ebc 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; -- 2.39.5