Commit dd001af365
Unregistered key
Layout: unified · split
src/worker.rs +9 −1
| @@ -21,6 +21,7 @@ use url::Url; | ||
| 21 | 21 | use matrix_sdk::{ |
| 22 | 22 | config::{RequestConfig, SyncSettings}, |
| 23 | 23 | encryption::verification::{SasVerification, Verification}, |
| 24 | encryption::{BackupDownloadStrategy, EncryptionSettings}, | |
| 24 | 25 | event_handler::Ctx, |
| 25 | 26 | matrix_auth::MatrixSession, |
| 26 | 27 | reqwest, |
| @@ -101,6 +102,12 @@ use crate::{ | ||
| 101 | 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 | 111 | const IAMB_DEVICE_NAME: &str = "iamb"; |
| 105 | 112 | const IAMB_USER_AGENT: &str = "iamb"; |
| 106 | 113 | const MIN_MSG_LOAD: u32 = 50; |
| @@ -664,7 +671,8 @@ async fn create_client_inner( | ||
| 664 | 671 | let builder = Client::builder() |
| 665 | 672 | .http_client(http) |
| 666 | 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 | 677 | let builder = if let Some(url) = homeserver { |
| 670 | 678 | // Use the explicitly specified homeserver. |