introduce config option to enable manual encryption mode

This commit is contained in:
missytake
2022-11-20 21:42:35 +01:00
parent 960a7f82ef
commit 62d56947ee
3 changed files with 6 additions and 0 deletions

View File

@@ -61,6 +61,9 @@ pub enum Config {
#[strum(props(default = "1"))]
E2eeEnabled,
#[strum(props(default = "0"))]
ManualEncryptionMode,
#[strum(props(default = "1"))]
MdnsEnabled,

View File

@@ -543,6 +543,7 @@ impl Context {
.await?
.unwrap_or_else(|| "unknown".to_string());
let e2ee_enabled = self.get_config_int(Config::E2eeEnabled).await?;
let manual_encryption_mode = self.get_config_int(Config::ManualEncryptionMode).await?;
let mdns_enabled = self.get_config_int(Config::MdnsEnabled).await?;
let bcc_self = self.get_config_int(Config::BccSelf).await?;
let send_sync_msgs = self.get_config_int(Config::SendSyncMsgs).await?;
@@ -650,6 +651,7 @@ impl Context {
res.insert("configured_mvbox_folder", configured_mvbox_folder);
res.insert("mdns_enabled", mdns_enabled.to_string());
res.insert("e2ee_enabled", e2ee_enabled.to_string());
res.insert("manual_encryption_mode", manual_encryption_mode.to_string());
res.insert(
"key_gen_type",
self.get_config_int(Config::KeyGenType).await?.to_string(),