mirror of
https://github.com/friendica/friendica
synced 2025-05-09 23:44:09 +02:00
Implementation of FEP-e232 for quoted posts
This commit is contained in:
parent
b5a69da872
commit
b39c48fb02
3 changed files with 21 additions and 14 deletions
|
@ -1589,15 +1589,14 @@ class Transmitter
|
|||
$tags[] = ['type' => 'Mention', 'href' => $announce['actor']['url'], 'name' => '@' . $announce['actor']['addr']];
|
||||
}
|
||||
|
||||
// @see https://codeberg.org/fediverse/fep/src/branch/main/feps/fep-e232.md
|
||||
// @see https://codeberg.org/fediverse/fep/src/branch/main/fep/e232/fep-e232.md
|
||||
if (!empty($quote_url)) {
|
||||
// Currently deactivated because of compatibility issues with Pleroma
|
||||
//$tags[] = [
|
||||
// 'type' => 'Link',
|
||||
// 'mediaType' => 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"',
|
||||
// 'href' => $quote_url,
|
||||
// 'name' => '♲ ' . BBCode::convertForUriId($item['uri-id'], $quote_url, BBCode::ACTIVITYPUB)
|
||||
//];
|
||||
$tags[] = [
|
||||
'type' => 'Link',
|
||||
'mediaType' => 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"',
|
||||
'href' => $quote_url,
|
||||
'name' => 'RE: ' . $quote_url,
|
||||
];
|
||||
}
|
||||
|
||||
return $tags;
|
||||
|
@ -1862,6 +1861,7 @@ class Transmitter
|
|||
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['_misskey_content'] = BBCode::removeSharedData($body);
|
||||
$data['quoteUrl'] = $item['quote-uri'];
|
||||
$body = DI::contentItem()->addShareLink($body, $item['quote-uri-id']);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue