From: Michael <heluecht@pirati.ca>
Date: Sat, 11 Jun 2022 06:05:55 +0000 (+0000)
Subject: API: Use the type field in the query for pinned posts
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4cf46b97700612bf76a1b2021b2b9224d2841307;p=friendica.git

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

diff --git a/src/Module/Api/Mastodon/Accounts/Statuses.php b/src/Module/Api/Mastodon/Accounts/Statuses.php
index 95289c6e25..7c75ea5cfc 100644
--- a/src/Module/Api/Mastodon/Accounts/Statuses.php
+++ b/src/Module/Api/Mastodon/Accounts/Statuses.php
@@ -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];