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