mirror of
https://github.com/friendica/friendica
synced 2024-11-19 13:03:41 +00:00
Pleroma with the Mastodon UI handles content warning different
This commit is contained in:
parent
aff99b32fd
commit
3f6fefaa9a
1 changed files with 3 additions and 2 deletions
|
@ -660,8 +660,9 @@ class OStatus
|
||||||
// Mastodon Content Warning
|
// Mastodon Content Warning
|
||||||
if (($item["verb"] == ACTIVITY_POST) && $xpath->evaluate('boolean(atom:summary)', $entry)) {
|
if (($item["verb"] == ACTIVITY_POST) && $xpath->evaluate('boolean(atom:summary)', $entry)) {
|
||||||
$clear_text = $xpath->query('atom:summary/text()', $entry)->item(0)->nodeValue;
|
$clear_text = $xpath->query('atom:summary/text()', $entry)->item(0)->nodeValue;
|
||||||
|
if (!empty($clear_text)) {
|
||||||
$item["body"] = html2bbcode($clear_text) . '[spoiler]' . $item["body"] . '[/spoiler]';
|
$item["body"] = html2bbcode($clear_text) . '[spoiler]' . $item["body"] . '[/spoiler]';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($self != '') && empty($item['protocol'])) {
|
if (($self != '') && empty($item['protocol'])) {
|
||||||
|
|
Loading…
Reference in a new issue