diff --git a/src/main.rs b/src/main.rs index 24d76bb..2e020a8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -7,6 +7,8 @@ use env_logger; use std::env::args; use xmpp::{ClientBuilder, ClientType, Event}; +use std::path::Path; +use xmpp::{ClientBuilder, ClientFeature, ClientType, Event}; #[tokio::main] async fn main() -> Result<(), Option<()>> { @@ -33,7 +35,14 @@ async fn main() -> Result<(), Option<()>> { match event { Event::Online => { println!("Online."); + client.upload_file_with( + "share.serv.ice" + Path::new("/some/file/path"), + ).await; } + Event::HTTPUploadedFile(url) => { + println!("URL: {}", url); + }, Event::Disconnected => { println!("Disconnected"); return Err(None);