mirror of
https://github.com/friendica/friendica
synced 2025-05-10 00:24:09 +02:00
Avoid quoting the own post
This commit is contained in:
parent
3e314d2fc6
commit
1dbc9bd472
6 changed files with 20 additions and 10 deletions
|
@ -1752,7 +1752,7 @@ class Transmitter
|
|||
|
||||
$body = BBCode::setMentionsToNicknames($body);
|
||||
|
||||
if (!empty($item['quote-uri-id'])) {
|
||||
if (!empty($item['quote-uri-id']) && ($item['quote-uri-id'] != $item['uri-id'])) {
|
||||
if (Post::exists(['uri-id' => $item['quote-uri-id'], 'network' => [Protocol::ACTIVITYPUB, Protocol::DFRN]])) {
|
||||
$real_quote = true;
|
||||
$data['quoteUrl'] = $item['quote-uri'];
|
||||
|
@ -1772,7 +1772,7 @@ class Transmitter
|
|||
if (!empty($language)) {
|
||||
$richbody = BBCode::setMentionsToNicknames($item['body'] ?? '');
|
||||
$richbody = Post\Media::removeFromEndOfBody($richbody);
|
||||
if (!empty($item['quote-uri-id'])) {
|
||||
if (!empty($item['quote-uri-id']) && ($item['quote-uri-id'] != $item['uri-id'])) {
|
||||
if ($real_quote) {
|
||||
$richbody = DI::contentItem()->addShareLink($richbody, $item['quote-uri-id']);
|
||||
} else {
|
||||
|
@ -1784,7 +1784,7 @@ class Transmitter
|
|||
$data['contentMap'][$language] = BBCode::convertForUriId($item['uri-id'], $richbody, BBCode::EXTERNAL);
|
||||
}
|
||||
|
||||
if (!empty($item['quote-uri-id'])) {
|
||||
if (!empty($item['quote-uri-id']) && ($item['quote-uri-id'] != $item['uri-id'])) {
|
||||
$source = DI::contentItem()->addSharedPost($item, $item['body']);
|
||||
} else {
|
||||
$source = $item['body'];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue