async file io

This commit is contained in:
dignifiedquire
2020-03-14 16:26:15 +01:00
parent 6db253e1cc
commit 7140898db9
19 changed files with 340 additions and 252 deletions

View File

@@ -376,7 +376,7 @@ impl Context {
chat::add_device_msg(&self, Some("core-about-device-chat"), Some(&mut msg)).await?;
let image = include_bytes!("../assets/welcome-image.jpg");
let blob = BlobObject::create(&self, "welcome-image.jpg".to_string(), image)?;
let blob = BlobObject::create(&self, "welcome-image.jpg".to_string(), image).await?;
let mut msg = Message::new(Viewtype::Image);
msg.param.set(Param::File, blob.as_name());
chat::add_device_msg(&self, Some("core-welcome-image"), Some(&mut msg)).await?;