add pipethrough for recids on suggestions ()

* add pipethrough

* add missing
This commit is contained in:
Hailey 2025-01-13 16:33:32 -08:00 committed by GitHub
parent a44db38d05
commit 17057144d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 1 deletions
packages/bsky/src/api/app/bsky

@ -71,6 +71,7 @@ const skeleton = async (input: {
return {
dids: res.data.actors.map((a) => a.did),
cursor: res.data.cursor,
recId: res.data.recId,
resHeaders: res.headers,
}
} else {
@ -129,6 +130,7 @@ const presentation = (input: {
return {
actors,
cursor: skeleton.cursor,
recId: skeleton.recId,
resHeaders: skeleton.resHeaders,
}
}
@ -148,5 +150,6 @@ type Params = QueryParams & {
type Skeleton = {
dids: string[]
cursor?: string
recId?: number
resHeaders?: Record<string, string>
}

@ -73,6 +73,7 @@ const skeleton = async (input: SkeletonFnInput<Context, Params>) => {
return {
isFallback: !res.data.relativeToDid,
suggestedDids: res.data.actors.map((a) => a.did),
recId: res.data.recId,
headers: res.headers,
}
} else {
@ -115,7 +116,12 @@ const presentation = (
const suggestions = mapDefined(suggestedDids, (did) =>
ctx.views.profileDetailed(did, hydration),
)
return { isFallback: skeleton.isFallback, suggestions, headers }
return {
isFallback: skeleton.isFallback,
suggestions,
recId: skeleton.recId,
headers,
}
}
type Context = {
@ -133,5 +139,6 @@ type Params = QueryParams & {
type SkeletonState = {
isFallback: boolean
suggestedDids: string[]
recId?: number
headers?: Record<string, string>
}