<?php
/**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
}
// Fill the item cache
- ActivityPub\Transmitter::createCachedActivityFromItem($target_item['id'], true);
+ $cache = ActivityPub\Transmitter::createCachedActivityFromItem($target_item['id'], true);
+ if (empty($cache)) {
+ Logger::info('Item cache was not created. The post will not be distributed.', ['id' => $target_item['id'], 'url' => $target_item['uri'], 'verb' => $target_item['verb']]);
+ return ['count' => 0, 'contacts' => []];
+ }
$delivery_queue_count = 0;
$contacts = [];