]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #11989 from annando/quote-again
authorPhilipp <admin+Github@philipp.info>
Wed, 12 Oct 2022 06:27:17 +0000 (08:27 +0200)
committerGitHub <noreply@github.com>
Wed, 12 Oct 2022 06:27:17 +0000 (08:27 +0200)
Only add images for non-federated quote shares

src/Content/Item.php

index d1cdbc679b7ab36dbe4889816eb068eeb2986ecf..1bf8410cd4356d2a64b52d4714ee607c1d4d17df 100644 (file)
@@ -657,7 +657,9 @@ class Item
        public function createSharedBlockByArray(array $item): string
        {
                if (!in_array($item['network'] ?? '', Protocol::FEDERATED)) {
+                       $item['guid'] = '';
                        $item['uri']  = '';
+                       $item['body'] = Post\Media::addAttachmentsToBody($item['uri-id'], $item['body']);
                }
 
                $shared_content = BBCode::getShareOpeningTag($item['author-name'], $item['author-link'], $item['author-avatar'], $item['plink'], $item['created'], $item['guid'], $item['uri']);
@@ -668,8 +670,6 @@ class Item
 
                $shared = BBCode::fetchShareAttributes($item['body']);
 
-               $item['body'] = Post\Media::addAttachmentsToBody($item['uri-id'], $item['body'], [Post\Media::IMAGE]);
-
                // If it is a reshared post then reformat it to avoid display problems with two share elements
                if (Diaspora::isReshare($item['body'], false)) {
                        if (!empty($shared['guid']) && ($encaspulated_share = self::createSharedPostByGuid($shared['guid']))) {