File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -434,18 +434,24 @@ impl Media {
434
434
}
435
435
}
436
436
437
+ let request_config = self
438
+ . client
439
+ . request_config ( )
440
+ // Downloading a file should have no timeout as we don't know the network connectivity
441
+ // available for the user or the file size
442
+ . timeout ( None ) ;
443
+
437
444
// Use the authenticated endpoints when the server supports Matrix 1.11 or the
438
445
// authenticated media stable feature.
439
446
let ( use_auth, request_config) =
440
447
if self . client . server_versions ( ) . await ?. contains ( & MatrixVersion :: V1_11 ) {
441
- ( true , None )
448
+ ( true , request_config )
442
449
} else if self . client . unstable_features ( ) . await ?. contains ( & FeatureFlag :: Msc3916Stable ) {
443
450
// We need to force the use of the stable endpoint with the Matrix version
444
451
// because Ruma does not handle stable features.
445
- let request_config = self . client . request_config ( ) ;
446
- ( true , Some ( request_config. force_matrix_version ( MatrixVersion :: V1_11 ) ) )
452
+ ( true , request_config. force_matrix_version ( MatrixVersion :: V1_11 ) )
447
453
} else {
448
- ( false , None )
454
+ ( false , request_config )
449
455
} ;
450
456
451
457
let content: Vec < u8 > = match & request. source {
You can’t perform that action at this time.
0 commit comments