mirror of
https://github.com/friendica/friendica
synced 2025-04-25 17:10:11 +00:00
Issue 12189: Quote share a feed now shares the linked feed url
This commit is contained in:
parent
32847f3398
commit
c88125348f
2 changed files with 6 additions and 1 deletions
|
@ -24,6 +24,7 @@ namespace Friendica\Module\Post;
|
|||
use Friendica\App;
|
||||
use Friendica\Content;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Protocol;
|
||||
use Friendica\Core\Session\Capability\IHandleUserSessions;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Model\Item;
|
||||
|
@ -59,7 +60,7 @@ class Share extends \Friendica\BaseModule
|
|||
System::httpError(403);
|
||||
}
|
||||
|
||||
$item = Post::selectFirst(['private', 'body', 'uri'], ['id' => $post_id]);
|
||||
$item = Post::selectFirst(['private', 'body', 'uri', 'plink', 'network'], ['id' => $post_id]);
|
||||
if (!$item || $item['private'] == Item::PRIVATE) {
|
||||
System::httpError(404);
|
||||
}
|
||||
|
@ -67,6 +68,8 @@ 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) {
|
||||
$content = '[attachment]' . $item['plink'] . '[/attachment]';
|
||||
} else {
|
||||
$content = '[share]' . $item['uri'] . '[/share]';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue