'origin' => true,
];
- $post = Post::selectFirst(['uri-id', 'id', 'gravity', 'uid', 'allow_cid', 'allow_gid', 'deny_cid', 'deny_gid', 'network'], $condition);
+ $post = Post::selectFirst(['uri-id', 'id', 'gravity', 'verb', 'uid', 'allow_cid', 'allow_gid', 'deny_cid', 'deny_gid', 'network'], $condition);
if (empty($post['id'])) {
throw new HTTPException\NotFoundException('Item with URI ID ' . $this->parameters['id'] . ' not found for user ' . $uid . '.');
}
$item['uid'] = $post['uid'];
$item['body'] = $body;
$item['network'] = $post['network'];
+ $item['gravity'] = $post['gravity'];
+ $item['verb'] = $post['verb'];
$item['app'] = $this->getApp();
if (!empty($request['language'])) {
}
}
- $item = DI::contentItem()->expandTags($item, $request['visibility'] == 'direct');
+ $item = DI::contentItem()->expandTags($item);
/*
The provided ids in the request value consists of these two sources:
$item['contact-id'] = $owner['id'];
$item['author-id'] = $item['owner-id'] = Contact::getPublicIdByUserId($uid);
$item['title'] = $object_data['name'];
- $item['body'] = Markdown::toBBCode($object_data['content']);
+ $item['body'] = Markdown::toBBCode($object_data['content'] ?? '');
$item['app'] = $application['name'] ?? 'API';
if (!empty($object_data['target'][Receiver::TARGET_GLOBAL])) {
$apcontact = APContact::getByURL($owner['url']);
+ if (empty($apcontact)) {
+ throw new \Friendica\Network\HTTPException\NotFoundException();
+ }
+
return self::getCollection($condition, DI::baseUrl() . '/outbox/' . $owner['nickname'], $page, $max_id, $uid, $apcontact['statuses_count']);
}