From 023474cc7418d808cee68eb580b5d013f4b758f9 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Tue, 1 Oct 2024 19:53:07 +0300 Subject: [PATCH] Don't replace first post with pin if limit=1 (#2841) don't replace post if limit=1 --- packages/bsky/src/api/app/bsky/feed/getAuthorFeed.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/bsky/src/api/app/bsky/feed/getAuthorFeed.ts b/packages/bsky/src/api/app/bsky/feed/getAuthorFeed.ts index 04423b520fb..1d1c808c535 100644 --- a/packages/bsky/src/api/app/bsky/feed/getAuthorFeed.ts +++ b/packages/bsky/src/api/app/bsky/feed/getAuthorFeed.ts @@ -106,13 +106,9 @@ export const skeleton = async (inputs: { }, authorPinned: true, } - if (params.limit === 1) { - items[0] = pinnedItem - } else { - // filter pinned post from first page only - items = items.filter((item) => item.post.uri !== pinnedItem.post.uri) - items.unshift(pinnedItem) - } + + items = items.filter((item) => item.post.uri !== pinnedItem.post.uri) + items.unshift(pinnedItem) } return {