very fast at protocol indexer with flexible filtering, xrpc queries, cursor-backed event stream, and more, built on fjall
rust fjall at-protocol atproto indexer
58
fork

Configure Feed

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

[api] send delete events dont skip them

dawn 2b3fcc56 a0d00a78

+7 -7
+7 -7
src/api/stream.rs
··· 183 183 let _entered = info_span!("record", cid = ?cid.map(|c| c.to_string())).entered(); 184 184 185 185 let marshallable = { 186 - let record_val; 187 - let block_bytes = cid 188 - .map(|cid| db.blocks.get(&cid.to_bytes())) 189 - .transpose() 190 - .map(Option::flatten); 186 + let mut record_val = None; 187 + let block_bytes = cid.map(|cid| db.blocks.get(&cid.to_bytes())).transpose(); 191 188 match block_bytes { 192 - Ok(Some(block_bytes)) => { 189 + Ok(Some(Some(block_bytes))) => { 193 190 match serde_ipld_dagcbor::from_slice::<RawData>(&block_bytes) { 194 191 Ok(val) => record_val = serde_json::to_value(val).ok(), 195 192 Err(e) => { ··· 198 195 } 199 196 } 200 197 } 201 - Ok(None) => { 198 + Ok(Some(None)) => { 202 199 warn!( 203 200 "block not found, possibly repo deleted but events not evicted yet?" 204 201 ); 205 202 continue; 203 + } 204 + Ok(None) => { 205 + // cid not found, its ok, delete event 206 206 } 207 207 Err(e) => { 208 208 error!(err = %e, "can't get block");