fix comments the branding pass made stale
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -136,7 +136,7 @@ async function loggedOutFetch({
|
||||
)
|
||||
/*
|
||||
* The response is hand-decoded rather than validated, so the lex output shape
|
||||
* is asserted here just as the old-world one was.
|
||||
* is asserted here.
|
||||
*/
|
||||
let data = res.ok
|
||||
? (lexParse(await res.text()) as app.bsky.feed.getFeed.$OutputBody)
|
||||
|
||||
@@ -307,11 +307,6 @@ async function resolveEmbed(
|
||||
if (resolvedLink.type === 'record') {
|
||||
return {
|
||||
$type: 'app.bsky.embed.record',
|
||||
/*
|
||||
* `resolve.ts` is still legacy-typed - its strong refs and URIs carry
|
||||
* unbranded strings. Assert at the boundary until it moves to the
|
||||
* clients.
|
||||
*/
|
||||
record: resolvedLink.record,
|
||||
}
|
||||
}
|
||||
@@ -495,11 +490,6 @@ async function resolveMedia(
|
||||
return undefined
|
||||
}
|
||||
|
||||
/*
|
||||
* `resolve.ts` still returns legacy-typed views, so its strong refs carry plain
|
||||
* strings where the record write wants the branded syntax types; assert at the
|
||||
* boundary until those views come from the generated lexicons.
|
||||
*/
|
||||
async function resolveRecord(
|
||||
clients: LinkResolvers,
|
||||
queryClient: QueryClient,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {AtUri} from '@atproto/syntax'
|
||||
import {type AtIdentifierString, AtUri} from '@atproto/syntax'
|
||||
import {parse} from 'psl'
|
||||
import TLDs from 'tlds'
|
||||
|
||||
@@ -43,8 +43,8 @@ export function makeRecordUri(
|
||||
rkey: string,
|
||||
) {
|
||||
const urip = new AtUri('at://placeholder.placeholder/')
|
||||
// @ts-expect-error TODO new-sdk-migration
|
||||
urip.host = didOrName
|
||||
// the helper takes the did or handle as a plain string
|
||||
urip.host = didOrName as AtIdentifierString
|
||||
urip.collection = collection
|
||||
urip.rkey = rkey
|
||||
return urip.toString()
|
||||
|
||||
Reference in New Issue
Block a user