Merge pull request #13018 from annando/share-federated

Only share from federated posts
This commit is contained in:
Hypolite Petovan
2023-04-22 08:34:53 -04:00
committed by GitHub
2 changed files with 9 additions and 4 deletions

View File

@@ -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]';