]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Post/Share.php
Merge pull request #13070 from xundeenergie/fix-share-via
[friendica.git] / src / Module / Post / Share.php
index 264c4693d7b96819ea4940e9a62941ff8a6c0ae1..db95c38c947215d2e7d36e21df88d8099a404a28 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -68,7 +68,7 @@ class Share extends \Friendica\BaseModule
                $shared = $this->contentItem->getSharedPost($item, ['uri']);
                if ($shared && empty($shared['comment'])) {
                        $content = '[share]' . $shared['post']['uri'] . '[/share]';
-               } elseif ($item['network'] == Protocol::FEED) {
+               } elseif (!empty($item['plink']) && !in_array($item['network'], Protocol::FEDERATED)) {
                        $content = '[attachment]' . $item['plink'] . '[/attachment]';
                } else {
                        $content = '[share]' . $item['uri'] . '[/share]';