diff --git a/src/Content/PageInfo.php b/src/Content/PageInfo.php index d301c4d04d..8a2ee9f9d9 100644 --- a/src/Content/PageInfo.php +++ b/src/Content/PageInfo.php @@ -163,7 +163,7 @@ class PageInfo } } - $text .= ']' . $data['text'] . '[/attachment]'; + $text .= ']' . $data['text'] ?? '' . '[/attachment]'; $hashtags = ''; if (!empty($data['keywords'])) { diff --git a/src/Protocol/ActivityPub/Processor.php b/src/Protocol/ActivityPub/Processor.php index ec1404c0f9..2c99132c20 100644 --- a/src/Protocol/ActivityPub/Processor.php +++ b/src/Protocol/ActivityPub/Processor.php @@ -272,6 +272,7 @@ class Processor $item = self::processContent($activity, $item); if (empty($item)) { + Logger::info('Message was not processed'); return []; } diff --git a/src/Protocol/ActivityPub/Receiver.php b/src/Protocol/ActivityPub/Receiver.php index ea5251438d..6910ee11c2 100644 --- a/src/Protocol/ActivityPub/Receiver.php +++ b/src/Protocol/ActivityPub/Receiver.php @@ -487,6 +487,10 @@ class Receiver $object_data['thread-completion'] = true; $item = ActivityPub\Processor::createItem($object_data); + if (empty($item)) { + return; + } + $item['post-type'] = Item::PT_ANNOUNCEMENT; ActivityPub\Processor::postItem($object_data, $item);