diff --git a/pkg/appview/jetstream/processor.go b/pkg/appview/jetstream/processor.go index 45c5830..de4a8f2 100644 --- a/pkg/appview/jetstream/processor.go +++ b/pkg/appview/jetstream/processor.go @@ -107,6 +107,15 @@ func (p *Processor) ProcessManifest(ctx context.Context, did string, recordData // Detect manifest type isManifestList := len(manifestRecord.Manifests) > 0 + // Extract hold DID from manifest (with fallback for legacy manifests) + // New manifests use holdDid field (DID format) + // Old manifests use holdEndpoint field (URL format) - convert to DID + holdDID := manifestRecord.HoldDID + if holdDID == "" && manifestRecord.HoldEndpoint != "" { + // Legacy manifest - convert URL to DID + holdDID = atproto.ResolveHoldDIDFromURL(manifestRecord.HoldEndpoint) + } + // Prepare manifest for insertion (WITHOUT annotation fields) manifest := &db.Manifest{ DID: did, @@ -114,7 +123,7 @@ func (p *Processor) ProcessManifest(ctx context.Context, did string, recordData Digest: manifestRecord.Digest, MediaType: manifestRecord.MediaType, SchemaVersion: manifestRecord.SchemaVersion, - HoldEndpoint: manifestRecord.HoldEndpoint, + HoldEndpoint: holdDID, CreatedAt: manifestRecord.CreatedAt, // Annotations removed - stored separately in repository_annotations table }