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.");
}
'body' => 'Parent status',
'parent' => 1,
'parent-uri-id' => 1,
+ 'thr-parent-id' => 1,
+ 'gravity' => GRAVITY_PARENT,
'author-link' => 'http://localhost/profile/selfcontact',
'wall' => 1,
'starred' => 1,
'body' => 'Reply',
'parent' => 1,
'parent-uri-id' => 1,
+ 'thr-parent-id' => 1,
+ 'gravity' => GRAVITY_COMMENT,
'author-link' => 'http://localhost/profile/selfcontact',
'wall' => 1,
'starred' => 0,
'body' => 'Other user status',
'parent' => 3,
'parent-uri-id' => 3,
+ 'thr-parent-id' => 3,
+ 'gravity' => GRAVITY_PARENT,
'author-link' => 'http://localhost/profile/othercontact',
'wall' => 1,
'starred' => 0,
'body' => 'Friend user reply',
'parent' => 1,
'parent-uri-id' => 1,
+ 'thr-parent-id' => 1,
+ 'gravity' => GRAVITY_COMMENT,
'author-link' => 'http://localhost/profile/othercontact',
'wall' => 1,
'starred' => 0,
'body' => '[share]Shared status[/share]',
'parent' => 1,
'parent-uri-id' => 1,
+ 'thr-parent-id' => 1,
+ 'gravity' => GRAVITY_COMMENT,
'author-link' => 'http://localhost/profile/othercontact',
'wall' => 1,
'starred' => 0,
'body' => 'Friend user status',
'parent' => 6,
'parent-uri-id' => 6,
+ 'thr-parent-id' => 6,
+ 'gravity' => GRAVITY_PARENT,
'author-link' => 'http://localhost/profile/othercontact',
'wall' => 1,
'starred' => 0,