[SDK] Validate and brand the persisted account did (#11387)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -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