1use anyhow::{Context, Result};
2
3use super::hab;
4
5pub async fn handle_resolve(name: &str, oobi_alias: &str, oobi: &str) -> Result<()> {
8 let mut hby = hab::open(name, None)?;
9 let stream = libkeri_http::Client::new()
10 .get_oobi(oobi)
11 .await
12 .with_context(|| format!("Failed to fetch OOBI {}", oobi))?;
13 let n = hby
14 .ingest(&stream, false)
15 .with_context(|| format!("Failed to process OOBI {}", oobi))?;
16 println!("{} succeeded ({} messages, alias {})", oobi, n, oobi_alias);
17 Ok(())
18}