at protocol indexer with flexible filtering, xrpc queries, and a cursor-backed event stream, built on fjall
at-protocol atproto indexer rust fjall

[api] revert direct value parsing in stream

ptr.pet 994d3cfc 21ef164e

verified
+4 -5
+4 -5
src/api/stream.rs
··· 11 11 }, 12 12 response::IntoResponse, 13 13 }; 14 - use jacquard_common::CowStr; 14 + use jacquard_common::{CowStr, RawData}; 15 15 use miette::{Context, IntoDiagnostic}; 16 16 use serde::Deserialize; 17 17 use std::sync::Arc; ··· 177 177 .map(Option::flatten); 178 178 match block_bytes { 179 179 Ok(Some(block_bytes)) => { 180 - match serde_ipld_dagcbor::from_slice::<serde_json::Value>(&block_bytes) 181 - { 182 - Ok(val) => record_val = val, 180 + match serde_ipld_dagcbor::from_slice::<RawData>(&block_bytes) { 181 + Ok(val) => record_val = serde_json::to_value(val).ok(), 183 182 Err(e) => { 184 183 error!(err = %e, "cant parse block, must be corrupted?"); 185 184 return; ··· 209 208 collection, 210 209 rkey: CowStr::Owned(rkey.to_smolstr().into()), 211 210 action: CowStr::Borrowed(action.as_str()), 212 - record: Some(record_val), 211 + record: record_val, 213 212 cid: cid.map(|c| jacquard_common::types::cid::Cid::ipld(c).into()), 214 213 }), 215 214 identity: None,