mirror of
https://github.com/friendica/friendica
synced 2025-04-22 01:50:11 +00:00
Improved API datasets
This commit is contained in:
parent
0c8bb0bc18
commit
d78892fc1b
2 changed files with 14 additions and 2 deletions
|
@ -1964,12 +1964,12 @@ function api_conversation_show($type)
|
|||
Logger::info(API_LOG_PREFIX . '{subaction}', ['module' => 'api', 'action' => 'conversation', 'subaction' => 'show', 'id' => $id]);
|
||||
|
||||
// try to fetch the item for the local user - or the public item, if there is no local one
|
||||
$item = Post::selectFirst(['parent-uri'], ['id' => $id]);
|
||||
$item = Post::selectFirst(['parent-uri-id'], ['id' => $id]);
|
||||
if (!DBA::isResult($item)) {
|
||||
throw new BadRequestException("There is no status with this id.");
|
||||
}
|
||||
|
||||
$parent = Post::selectFirst(['id'], ['uri' => $item['parent-uri'], 'uid' => [0, api_user()]], ['order' => ['uid' => true]]);
|
||||
$parent = Post::selectFirst(['id'], ['uri-id' => $item['parent-uri-id'], 'uid' => [0, api_user()]], ['order' => ['uid' => true]]);
|
||||
if (!DBA::isResult($parent)) {
|
||||
throw new BadRequestException("There is no status with this id.");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue