X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FApi%2FMastodon%2FStatuses%2FContext.php;h=bf49d265ca777804311e6a077236a6e879e0e09e;hb=1e3182a896cf991620e4d2a01f845fc59efe78ab;hp=351b65d360868db9c77e8523b95f78609bdab098;hpb=a0e455a4938c7dd72e32df2b1cf8839e01b016a9;p=friendica.git diff --git a/src/Module/Api/Mastodon/Statuses/Context.php b/src/Module/Api/Mastodon/Statuses/Context.php index 351b65d360..bf49d265ca 100644 --- a/src/Module/Api/Mastodon/Statuses/Context.php +++ b/src/Module/Api/Mastodon/Statuses/Context.php @@ -45,13 +45,15 @@ class Context extends BaseApi } $id = $parameters['id']; + $parent = Post::selectFirst(['parent-uri-id'], ['uri-id' => $id]); if (!DBA::isResult($parent)) { DI::mstdnError()->RecordNotFound(); } - $parents = []; + $parents = []; $children = []; + $posts = Post::select(['uri-id', 'thr-parent-id'], ['parent-uri-id' => $parent['parent-uri-id']], [], false); while ($post = Post::fetch($posts)) { if ($post['uri-id'] == $post['thr-parent-id']) {