From: Michael Date: Tue, 13 Mar 2018 21:58:05 +0000 (+0000) Subject: Pleroma with the Mastodon UI handles content warning different X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3f6fefaa9ac2dd5a48ab3c521f425c84c9d32273;p=friendica.git Pleroma with the Mastodon UI handles content warning different --- diff --git a/src/Protocol/OStatus.php b/src/Protocol/OStatus.php index aad97c80ff..aa1079407a 100644 --- a/src/Protocol/OStatus.php +++ b/src/Protocol/OStatus.php @@ -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'])) {