]> git.mxchange.org Git - friendica.git/commitdiff
API: Use the type field in the query for pinned posts
authorMichael <heluecht@pirati.ca>
Sat, 11 Jun 2022 06:05:55 +0000 (06:05 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 11 Jun 2022 06:05:55 +0000 (06:05 +0000)
src/Module/Api/Mastodon/Accounts/Statuses.php

index 95289c6e259296f54471e6e3d741eaae46260bc1..7c75ea5cfc67279ef3c4cef584c8af6b3c5ebc60 100644 (file)
@@ -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];