Skip to content

Commit 0fee716

Browse files
zecakehstefanceriu
authored andcommitted
fix(sdk): Override timeout of media downloads for unauthenticated media endpoints too
There is no reason to treat them differently. Signed-off-by: Kévin Commaille <[email protected]>
1 parent c41ed8a commit 0fee716

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/matrix-sdk/src/media.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ impl Media {
455455
} else {
456456
#[allow(deprecated)]
457457
let request = media::get_content::v3::Request::from_url(&file.url)?;
458-
self.client.send(request).await?.file
458+
self.client.send(request).with_request_config(request_config).await?.file
459459
};
460460

461461
#[cfg(feature = "e2e-encryption")]
@@ -505,15 +505,15 @@ impl Media {
505505
request
506506
};
507507

508-
self.client.send(request).await?.file
508+
self.client.send(request).with_request_config(request_config).await?.file
509509
}
510510
} else if use_auth {
511511
let request = authenticated_media::get_content::v1::Request::from_uri(uri)?;
512512
self.client.send(request).with_request_config(request_config).await?.file
513513
} else {
514514
#[allow(deprecated)]
515515
let request = media::get_content::v3::Request::from_url(uri)?;
516-
self.client.send(request).await?.file
516+
self.client.send(request).with_request_config(request_config).await?.file
517517
}
518518
}
519519
};

0 commit comments

Comments
 (0)