Pleroma with the Mastodon UI handles content warning different

2022.09-rc
Michael 2018-03-13 21:58:05 +00:00
rodzic aff99b32fd
commit 3f6fefaa9a
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -660,8 +660,9 @@ class OStatus
// Mastodon Content Warning
if (($item["verb"] == ACTIVITY_POST) && $xpath->evaluate('boolean(atom:summary)', $entry)) {
$clear_text = $xpath->query('atom:summary/text()', $entry)->item(0)->nodeValue;
$item["body"] = html2bbcode($clear_text) . '[spoiler]' . $item["body"] . '[/spoiler]';
if (!empty($clear_text)) {
$item["body"] = html2bbcode($clear_text) . '[spoiler]' . $item["body"] . '[/spoiler]';
}
}
if (($self != '') && empty($item['protocol'])) {