Implementation of FEP-e232 for quoted posts

This commit is contained in:
Michael 2024-03-24 06:05:37 +00:00
parent b5a69da872
commit b39c48fb02
3 changed files with 21 additions and 14 deletions

View file

@ -800,14 +800,14 @@ class Item
*/
public function addShareLink(string $body, int $quote_uri_id): string
{
$post = Post::selectFirstPost(['uri', 'plink'], ['uri-id' => $quote_uri_id]);
$post = Post::selectFirstPost(['uri'], ['uri-id' => $quote_uri_id]);
if (empty($post)) {
return $body;
}
$body = BBCode::removeSharedData($body);
$body .= "\n" . ($post['plink'] ?: $post['uri']);
$body .= "\nRE: " . $post['uri'];
return $body;
}