]> git.mxchange.org Git - friendica.git/commitdiff
Made also this one sweeter (null-coalscing)
authorRoland Häder <roland@mxchange.org>
Thu, 16 Jun 2022 15:36:32 +0000 (17:36 +0200)
committerRoland Häder <roland@mxchange.org>
Thu, 16 Jun 2022 15:36:47 +0000 (17:36 +0200)
src/Protocol/ActivityPub/Processor.php

index 1c448cd5757ff6bc0c35f96fbaf9c8b2834afbc7..2288427b476f3fb06de065d62b86bc4ee5fa87df 100644 (file)
@@ -1225,8 +1225,7 @@ class Processor
                $attributed_to = JsonLD::fetchElement($activity['as:object'], 'as:attributedTo', '@id');
                $authorid = Contact::getIdForURL($attributed_to);
 
-               $value = JsonLD::fetchElement($activity['as:object'], 'as:content', '@value');
-               $body = (!empty($value) ? HTML::toBBCode($value) : '');
+               $body = HTML::toBBCode(JsonLD::fetchElement($activity['as:object'], 'as:content', '@value') ?? '');
 
                $messageTags = [];
                $tags = Receiver::processTags(JsonLD::fetchElementArray($activity['as:object'], 'as:tag') ?? []);