mirror of
https://github.com/youwen5/iamb.git
synced 2025-06-20 05:39:52 -07:00
Download rooms keys from backups if they exist (#211)
This commit is contained in:
parent
9732971fc2
commit
dd001af365
1 changed files with 9 additions and 1 deletions
|
@ -21,6 +21,7 @@ use url::Url;
|
|||
use matrix_sdk::{
|
||||
config::{RequestConfig, SyncSettings},
|
||||
encryption::verification::{SasVerification, Verification},
|
||||
encryption::{BackupDownloadStrategy, EncryptionSettings},
|
||||
event_handler::Ctx,
|
||||
matrix_auth::MatrixSession,
|
||||
reqwest,
|
||||
|
@ -101,6 +102,12 @@ use crate::{
|
|||
ApplicationSettings,
|
||||
};
|
||||
|
||||
const DEFAULT_ENCRYPTION_SETTINGS: EncryptionSettings = EncryptionSettings {
|
||||
auto_enable_cross_signing: true,
|
||||
auto_enable_backups: true,
|
||||
backup_download_strategy: BackupDownloadStrategy::AfterDecryptionFailure,
|
||||
};
|
||||
|
||||
const IAMB_DEVICE_NAME: &str = "iamb";
|
||||
const IAMB_USER_AGENT: &str = "iamb";
|
||||
const MIN_MSG_LOAD: u32 = 50;
|
||||
|
@ -664,7 +671,8 @@ async fn create_client_inner(
|
|||
let builder = Client::builder()
|
||||
.http_client(http)
|
||||
.sqlite_store(settings.sqlite_dir.as_path(), None)
|
||||
.request_config(req_config);
|
||||
.request_config(req_config)
|
||||
.with_encryption_settings(DEFAULT_ENCRYPTION_SETTINGS.clone());
|
||||
|
||||
let builder = if let Some(url) = homeserver {
|
||||
// Use the explicitly specified homeserver.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue