Return the pageinfo when feed is shared
This commit is contained in:
parent
1cc3fa6d77
commit
c2e57c5c0e
|
@ -656,7 +656,9 @@ class Item
|
||||||
*/
|
*/
|
||||||
public function createSharedBlockByArray(array $item): string
|
public function createSharedBlockByArray(array $item): string
|
||||||
{
|
{
|
||||||
if (!in_array($item['network'] ?? '', Protocol::FEDERATED)) {
|
if ($item['network'] == Protocol::FEED) {
|
||||||
|
return PageInfo::getFooterFromUrl($item['plink']);
|
||||||
|
} elseif (!in_array($item['network'] ?? '', Protocol::FEDERATED)) {
|
||||||
$item['guid'] = '';
|
$item['guid'] = '';
|
||||||
$item['uri'] = '';
|
$item['uri'] = '';
|
||||||
$item['body'] = Post\Media::addAttachmentsToBody($item['uri-id'], $item['body']);
|
$item['body'] = Post\Media::addAttachmentsToBody($item['uri-id'], $item['body']);
|
||||||
|
@ -675,7 +677,7 @@ class Item
|
||||||
if (!empty($shared['guid']) && ($encaspulated_share = self::createSharedPostByGuid($shared['guid']))) {
|
if (!empty($shared['guid']) && ($encaspulated_share = self::createSharedPostByGuid($shared['guid']))) {
|
||||||
$item['body'] = preg_replace("/\[share.*?\](.*)\[\/share\]/ism", $encaspulated_share, $item['body']);
|
$item['body'] = preg_replace("/\[share.*?\](.*)\[\/share\]/ism", $encaspulated_share, $item['body']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$item['body'] = HTML::toBBCode(BBCode::convertForUriId($item['uri-id'], $item['body'], BBCode::ACTIVITYPUB));
|
$item['body'] = HTML::toBBCode(BBCode::convertForUriId($item['uri-id'], $item['body'], BBCode::ACTIVITYPUB));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user