Private
Public Access
1
0

AttachmentStore now has its own runloop, can download attachments

This commit is contained in:
2025-06-05 20:19:34 -07:00
parent 595c7a764b
commit cbc7679f58
8 changed files with 160 additions and 70 deletions

View File

@@ -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)

View File

@@ -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