]> git.mxchange.org Git - friendica.git/commitdiff
We only need a link here
authorMichael <heluecht@pirati.ca>
Sat, 4 Mar 2023 21:36:19 +0000 (21:36 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 4 Mar 2023 21:36:19 +0000 (21:36 +0000)
src/Factory/Api/Mastodon/Status.php
src/Protocol/Feed.php
src/Protocol/OStatus.php

index a1f7060ac0a81f795f7ec49441f583cba4f5991f..190f1e0e218e94e82cc55ab477c1df9dc3680128 100644 (file)
@@ -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']);
                        }
                }
 
index cbffd810c1d03b444faeedac9cd9ae201b2d623c..625305161f88d127b1e764b172f1730cad7f098b 100644 (file)
@@ -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);
 
index 220424a31c62569a30f285f2f52cd0470831a1d8..abaa298ebcf3fc5f78016df7df2c1713dddc7eff 100644 (file)
@@ -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;