[PLUGIN][ActivityPub][Model][Note] Sometimes content is explicitely null

This commit is contained in:
Diogo Peralta Cordeiro 2022-02-19 05:29:00 +00:00
parent 496701ce73
commit ecfd6b5ad2
Signed by: diogo
GPG Key ID: 18D2D35001FBFAB0

View File

@ -146,7 +146,7 @@ class Note extends Model
'is_local' => false,
'created' => new DateTime($type_note->get('published') ?? 'now'),
'content' => $type_note->get('content') ?? null,
'rendered' => $type_note->has('content') ? HTML::sanitize($type_note->get('content')) : null,
'rendered' => is_null($type_note->get('content')) ? null : HTML::sanitize($type_note->get('content')),
'title' => $type_note->get('name') ?? null,
'content_type' => 'text/html',
'language_id' => $type_note->get('contentLang') ?? null,