Commit dd001af365
Unregistered key
Layout: unified · split
src/worker.rs +9 −1
| @@ -21,6 +21,7 @@ use url::Url; | |||
| 21 | use matrix_sdk::{ | 21 | use matrix_sdk::{ |
| 22 | config::{RequestConfig, SyncSettings}, | 22 | config::{RequestConfig, SyncSettings}, |
| 23 | encryption::verification::{SasVerification, Verification}, | 23 | encryption::verification::{SasVerification, Verification}, |
| 24 | encryption::{BackupDownloadStrategy, EncryptionSettings}, | ||
| 24 | event_handler::Ctx, | 25 | event_handler::Ctx, |
| 25 | matrix_auth::MatrixSession, | 26 | matrix_auth::MatrixSession, |
| 26 | reqwest, | 27 | reqwest, |
| @@ -101,6 +102,12 @@ use crate::{ | |||
| 101 | ApplicationSettings, | 102 | ApplicationSettings, |
| 102 | }; | 103 | }; |
| 103 | 104 | ||
| 105 | const DEFAULT_ENCRYPTION_SETTINGS: EncryptionSettings = EncryptionSettings { | ||
| 106 | auto_enable_cross_signing: true, | ||
| 107 | auto_enable_backups: true, | ||
| 108 | backup_download_strategy: BackupDownloadStrategy::AfterDecryptionFailure, | ||
| 109 | }; | ||
| 110 | |||
| 104 | const IAMB_DEVICE_NAME: &str = "iamb"; | 111 | const IAMB_DEVICE_NAME: &str = "iamb"; |
| 105 | const IAMB_USER_AGENT: &str = "iamb"; | 112 | const IAMB_USER_AGENT: &str = "iamb"; |
| 106 | const MIN_MSG_LOAD: u32 = 50; | 113 | const MIN_MSG_LOAD: u32 = 50; |
| @@ -664,7 +671,8 @@ async fn create_client_inner( | |||
| 664 | let builder = Client::builder() | 671 | let builder = Client::builder() |
| 665 | .http_client(http) | 672 | .http_client(http) |
| 666 | .sqlite_store(settings.sqlite_dir.as_path(), None) | 673 | .sqlite_store(settings.sqlite_dir.as_path(), None) |
| 667 | .request_config(req_config); | 674 | .request_config(req_config) |
| 675 | .with_encryption_settings(DEFAULT_ENCRYPTION_SETTINGS.clone()); | ||
| 668 | 676 | ||
| 669 | let builder = if let Some(url) = homeserver { | 677 | let builder = if let Some(url) = homeserver { |
| 670 | // Use the explicitly specified homeserver. | 678 | // Use the explicitly specified homeserver. |