Merge pull request #11307 from annando/api-reply-fix

API: Fix "in_reply_to_status_id"
This commit is contained in:
Hypolite Petovan 2022-03-08 15:53:12 -05:00 committed by GitHub
commit 00aa905c15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,7 +110,7 @@ class Update extends BaseApi
} }
if ($request['in_reply_to_status_id']) { if ($request['in_reply_to_status_id']) {
$parent = Post::selectFirst(['uri'], ['id' => $request['in_reply_to_status_id'], 'uid' => [0, $uid]]); $parent = Post::selectFirst(['uri'], ['uri-id' => $request['in_reply_to_status_id'], 'uid' => [0, $uid]]);
$item['thr-parent'] = $parent['uri']; $item['thr-parent'] = $parent['uri'];
$item['gravity'] = GRAVITY_COMMENT; $item['gravity'] = GRAVITY_COMMENT;