Skip to content

Fix post blob hydration to use proper AT Protocol API #3

@scarnecchia

Description

@scarnecchia

Problem

Post blob hydration is currently broken - it's using CDN paths instead of the proper AT Protocol API endpoint.

Current Implementation

The BlobProcessor is fetching from CDN URLs:

https://cdn.bsky.app/img/feed_thumbnail/plain/${did}/${cid}@jpeg
https://cdn.bsky.app/img/feed_fullsize/plain/${did}/${cid}@jpeg

This doesn't work reliably and requires auth context.

Solution

Apply the same fix we used for profile blobs:

  1. Resolve the user's PDS endpoint from their DID document via plc.wtf
  2. Use the proper AT Protocol API: ${pdsEndpoint}/xrpc/com.atproto.sync.getBlob?did=${did}&cid=${cid}

Reference

See ProfileHydrationService.processProfileBlob() for the working implementation.

Also check docs/profile-blob-hydration.md section 7 for details on proper blob fetching.

Files to Update

  • src/blobs/processor.ts - Update processBlob() method
  • May need to add PDS resolution logic or import from profile service

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions