fix(feed): only include pins for author threads filter
Previously, pins were included for both 'posts_with_replies' and 'posts_and_author_threads' filters. This change restricts pin inclusion to only the 'posts_and_author_threads' filter, ensuring correct feed behavior and reducing unnecessary data in other filter modes.
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
import {
|
import {
|
||||||
AppBskyFeedDefs,
|
AppBskyFeedDefs,
|
||||||
AppBskyFeedGetAuthorFeed as GetAuthorFeed,
|
type AppBskyFeedGetAuthorFeed as GetAuthorFeed,
|
||||||
BskyAgent,
|
type BskyAgent,
|
||||||
} from '@atproto/api'
|
} from '@atproto/api'
|
||||||
|
|
||||||
import {FeedAPI, FeedAPIResponse} from './types'
|
import {type FeedAPI, type FeedAPIResponse} from './types'
|
||||||
|
|
||||||
export class AuthorFeedAPI implements FeedAPI {
|
export class AuthorFeedAPI implements FeedAPI {
|
||||||
agent: BskyAgent
|
agent: BskyAgent
|
||||||
@@ -23,9 +23,7 @@ export class AuthorFeedAPI implements FeedAPI {
|
|||||||
|
|
||||||
get params() {
|
get params() {
|
||||||
const params = {...this._params}
|
const params = {...this._params}
|
||||||
params.includePins =
|
params.includePins = params.filter === 'posts_and_author_threads'
|
||||||
params.filter === 'posts_with_replies' ||
|
|
||||||
params.filter === 'posts_and_author_threads'
|
|
||||||
return params
|
return params
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user