use mid_chat::ChatAttachment; /* use tokio::sync::OnceCell; static PHOEBE_MEDIA_BASE_URL: OnceCell = OnceCell::const_new(); async fn get_base_url() -> &'static str { PHOEBE_MEDIA_BASE_URL .get_or_init(|| async { std::env::var("PHOEBE_MEDIA_BASE_URL") .expect("PHOEBE_MEDIA_BASE_URL environment variable was not set!") }) .await } */ pub async fn attachment_to_url(attachment: &ChatAttachment) -> String { match attachment { ChatAttachment::URL(s) => s.clone(), ChatAttachment::InMemory { .. } => { todo!("Put in-memory attachment into webroot") } } }