Run codemod for replacing BskyAgent with AtpAgent (#10862)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
type AppBskyFeedDefs,
|
||||
type AppBskyFeedGetFeed as GetCustomFeed,
|
||||
BskyAgent,
|
||||
AtpAgent,
|
||||
jsonStringToLex,
|
||||
} from '@atproto/api'
|
||||
|
||||
@@ -13,7 +13,7 @@ import {type FeedAPI, type FeedAPIResponse} from './types'
|
||||
import {createBskyTopicsHeader, isBlueskyOwnedFeed} from './utils'
|
||||
|
||||
export class CustomFeedAPI implements FeedAPI {
|
||||
agent: BskyAgent
|
||||
agent: AtpAgent
|
||||
params: GetCustomFeed.QueryParams
|
||||
userInterests?: string
|
||||
|
||||
@@ -22,7 +22,7 @@ export class CustomFeedAPI implements FeedAPI {
|
||||
feedParams,
|
||||
userInterests,
|
||||
}: {
|
||||
agent: BskyAgent
|
||||
agent: AtpAgent
|
||||
feedParams: GetCustomFeed.QueryParams
|
||||
userInterests?: string
|
||||
}) {
|
||||
@@ -113,7 +113,7 @@ async function loggedOutFetch({
|
||||
* @see https://github.com/bluesky-social/atproto/blob/60df3fc652b00cdff71dd9235d98a7a4bb828f05/packages/api/src/agent.ts#L120
|
||||
*/
|
||||
const labelersHeader = {
|
||||
'atproto-accept-labelers': BskyAgent.appLabelers
|
||||
'atproto-accept-labelers': AtpAgent.appLabelers
|
||||
.map(l => `${l};redact`)
|
||||
.join(', '),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user