$in_reply = [];
}
- $delivery_data = new FriendicaDeliveryData($item['delivery_queue_count'] ?? 0, $item['delivery_queue_done'] ?? 0, $item['delivery_queue_failed'] ?? 0);
+ $delivery_data = new FriendicaDeliveryData($item['delivery_queue_count'], $item['delivery_queue_done'], $item['delivery_queue_failed']);
$friendica = new FriendicaExtension($item['title'], $counts->dislikes, $delivery_data);
return new \Friendica\Object\Api\Mastodon\Status($item, $account, $counts, $userAttributes, $sensitive, $application, $mentions, $tags, $card, $attachments, $in_reply, $reshare, $friendica, $quote, $poll);
*/
class FriendicaDeliveryData extends BaseDataTransferObject
{
- /** @var int */
+ /** @var int|null */
protected $delivery_queue_count;
- /** @var int */
+ /** @var int|null */
protected $delivery_queue_done;
- /** @var int */
+ /** @var int|null */
protected $delivery_queue_failed;
/**
*
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
- public function __construct(int $delivery_queue_count, int $delivery_queue_done, int $delivery_queue_failed)
+ public function __construct(?int $delivery_queue_count, ?int $delivery_queue_done, ?int $delivery_queue_failed)
{
$this->delivery_queue_count = $delivery_queue_count;
$this->delivery_queue_done = $delivery_queue_done;