API: Use the type field in the query for pinned posts

This commit is contained in:
Michael 2022-06-11 06:05:55 +00:00
parent 176f0c1216
commit 4cf46b9770

View file

@ -68,7 +68,7 @@ class Statuses extends BaseApi
$params = ['order' => ['uri-id' => true], 'limit' => $request['limit']]; $params = ['order' => ['uri-id' => true], 'limit' => $request['limit']];
if ($request['pinned']) { if ($request['pinned']) {
$condition = ['author-id' => $id, 'private' => [Item::PUBLIC, Item::UNLISTED]]; $condition = ['author-id' => $id, 'private' => [Item::PUBLIC, Item::UNLISTED], 'type' => Post\Collection::FEATURED];
} elseif (!$uid) { } elseif (!$uid) {
$condition = ['author-id' => $id, 'private' => [Item::PUBLIC, Item::UNLISTED], $condition = ['author-id' => $id, 'private' => [Item::PUBLIC, Item::UNLISTED],
'uid' => 0, 'network' => Protocol::FEDERATED]; 'uid' => 0, 'network' => Protocol::FEDERATED];