AttachmentStore now has its own runloop, can download attachments
This commit is contained in:
@@ -280,8 +280,9 @@ impl<K: AuthenticationStore + Send + Sync> APIInterface for HTTPAPIClient<K> {
|
||||
async fn fetch_attachment_data(
|
||||
&mut self,
|
||||
guid: &String,
|
||||
preview: bool,
|
||||
) -> Result<ResponseStream, Self::Error> {
|
||||
let endpoint = format!("attachment?guid={}", guid);
|
||||
let endpoint = format!("attachment?guid={}&preview={}", guid, preview);
|
||||
self.response_with_body_retry(&endpoint, Method::GET, Body::empty, true)
|
||||
.await
|
||||
.map(hyper::Response::into_body)
|
||||
|
||||
@@ -49,6 +49,7 @@ pub trait APIInterface {
|
||||
async fn fetch_attachment_data(
|
||||
&mut self,
|
||||
guid: &String,
|
||||
preview: bool,
|
||||
) -> Result<Self::ResponseStream, Self::Error>;
|
||||
|
||||
// (POST) /authenticate
|
||||
|
||||
Reference in New Issue
Block a user