Made also this one sweeter (null-coalscing)

This commit is contained in:
Roland Häder 2022-06-16 17:36:32 +02:00
parent 0e1f734b03
commit 51a7b5c584
Signed by: roland
GPG key ID: C82EDE5DDFA0BA77

View file

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