diff --git a/src/lib/query/feed.ts b/src/lib/query/feed.ts index e243b35..5db9a90 100644 --- a/src/lib/query/feed.ts +++ b/src/lib/query/feed.ts @@ -39,9 +39,15 @@ export async function fetchPost(uri: AtUriString) { return postCache.get(uri)!; } - console.log(`Pulling record from slingshot: ${uri}`) + // console.log(`Pulling record from slingshot: ${uri}`) const atUri = new AtUri(uri); - const record = await Slingshot.call(com.atproto.repo.getRecord, { + // const record = await Slingshot.call(com.atproto.repo.getRecord, { + // repo: atUri.did, + // collection: atUri.collection as any, + // rkey: atUri.rkey, + // }); + const pdsAgent = getAgent((await resolveProfile(atUri.did)).pds) + const { data: record } = await pdsAgent.com.atproto.repo.getRecord({ repo: atUri.did, collection: atUri.collection as any, rkey: atUri.rkey, @@ -79,9 +85,15 @@ export async function fetchPostThread( return postThreadCache.get(ref.uri)!; } - console.log(`Pulling record from slingshot: ${ref.uri}`) + // console.log(`Pulling record from slingshot: ${ref.uri}`) const atUri = new AtUri(ref.uri); - const record = await Slingshot.call(com.atproto.repo.getRecord, { + // const record = await Slingshot.call(com.atproto.repo.getRecord, { + // repo: atUri.did, + // collection: atUri.collection as any, + // rkey: atUri.rkey, + // }); + const pdsAgent = getAgent((await resolveProfile(atUri.did)).pds) + const { data: record } = await pdsAgent.com.atproto.repo.getRecord({ repo: atUri.did, collection: atUri.collection as any, rkey: atUri.rkey,