Constellation, Spacedust, Slingshot, UFOs: atproto crates and services for microcosm
75
fork

Configure Feed

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

oops fix the server query handling

apparently axum doesn't like multi-value query strings because serde doesn't or something..

comma-sep is gross but hey it's working

phil ff3e7343 533c9eb3

+7 -3
+7 -3
constellation/src/server/mod.rs
··· 238 238 collection: String, 239 239 path: String, 240 240 cursor: Option<OpaqueApiCursor>, 241 - did: Vec<String>, 241 + from_dids: Option<String>, // comma separated: gross 242 242 limit: Option<u64>, 243 243 // TODO: allow reverse (er, forward) order as well 244 244 } ··· 271 271 return Err(http::StatusCode::BAD_REQUEST); 272 272 } 273 273 274 - let filter_dids = HashSet::from_iter(query.did.iter().map(|d| Did(d.to_string()))); 274 + let filter_dids = &query 275 + .from_dids 276 + .clone() 277 + .map(|comma_joined| HashSet::from_iter(comma_joined.split(',').map(|d| Did(d.to_string())))) 278 + .unwrap_or_default(); 275 279 276 280 let paged = store 277 281 .get_links( ··· 280 284 &query.path, 281 285 limit, 282 286 until, 283 - &filter_dids, 287 + filter_dids, 284 288 ) 285 289 .map_err(|_| http::StatusCode::INTERNAL_SERVER_ERROR)?; 286 290