add pipethrough for recids on suggestions (#3365)
* add pipethrough * add missing
This commit is contained in:
parent
a44db38d05
commit
17057144d8
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>
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user