Merge pull request #11628 from annando/api-pinned

API: Use the type field in the query for pinned posts
pull/11629/head
Tobias Diekershoff 2022-06-11 08:29:28 +02:00 zatwierdzone przez GitHub
commit 3394b65c60
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -68,7 +68,7 @@ class Statuses extends BaseApi
$params = ['order' => ['uri-id' => true], 'limit' => $request['limit']];
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) {
$condition = ['author-id' => $id, 'private' => [Item::PUBLIC, Item::UNLISTED],
'uid' => 0, 'network' => Protocol::FEDERATED];