search for standard sites pub-search.waow.tech
search zig blog atproto
11
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: extract publication.uri from strongRef objects

standard.site lexicon uses strongRef ({uri, cid}) for publication field,
not a direct string URI. Use zat.json path support to extract nested uri.

also removed pdsls.dev fallback - the data is in the records

zzstoatzz 9e3dd968 434e9a5b

+8 -6
+6 -1
backend/src/extractor.zig
··· 86 86 // extract optional fields 87 87 const created_at = zat.json.getString(record_val, "publishedAt") orelse 88 88 zat.json.getString(record_val, "createdAt"); 89 + 90 + // publication/site can be a string (direct URI) or strongRef object ({uri, cid}) 91 + // zat.json.getString supports paths like "publication.uri" 89 92 const publication_uri = zat.json.getString(record_val, "publication") orelse 90 - zat.json.getString(record_val, "site"); // site.standard uses "site" 93 + zat.json.getString(record_val, "publication.uri") orelse 94 + zat.json.getString(record_val, "site") orelse 95 + zat.json.getString(record_val, "site.uri"); 91 96 92 97 // extract tags - allocate owned slice 93 98 const tags = try extractTags(allocator, record_val);
+2 -5
site/index.html
··· 512 512 if (entityType === 'publication') { 513 513 return doc.basePath ? `https://${doc.basePath}` : null; 514 514 } 515 - // documents: prefer basePath, fallback to platform-specific pattern, then universal fallback 515 + // documents: prefer basePath from publication 516 516 if (doc.basePath && doc.rkey) { 517 517 return `https://${doc.basePath}/${doc.rkey}`; 518 518 } 519 + // fallback to platform-specific URL pattern 519 520 const config = PLATFORM_CONFIG[platform]; 520 521 if (config && config.docUrl && doc.did && doc.rkey) { 521 522 return config.docUrl(doc.did, doc.rkey); 522 - } 523 - // universal fallback: link to AT-URI viewer 524 - if (doc.uri) { 525 - return `https://pdsls.dev/${doc.uri}`; 526 523 } 527 524 return null; 528 525 }